How do I implement Ctrl-C handling in bash scripts so that the script interrupts as well as the currently running command, launched by it?
Imagine there's a script that executes some long-running command. The user hits C-C and interrupts the command, but the script proceeds. I need it to behave in a way that they both are killed
bg, kill it or continue it in foreground withfg. See the bash manpage sectionJOB CONTROL. – ott-- Nov 5 '11 at 17:44