I have the following script1.sh
:
#!/bin/bash
trap 'echo "Exit signal detected..."; kill %1' 0 1 2 3 15
./script2.sh & #starts a java app
./script3.sh #starts a different java app
When I do CTRL + C, it terminates script1.sh
, but the Java Swing app started by script2.sh
still stays open. How come it doesn't kill it?