1
0
Fork 0
Examples of how to kill all child jobs when a shell script exits. https://aweirdimagination.net/2020/06/28/kill-child-jobs-on-script-exit/
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Perelman 9c7b084555 Improved full example and added pkill-P version. 4 years ago
test Made test output more readable. 4 years ago
LICENSE Initial commit 4 years ago
README.md Initial commit 4 years ago
all-full-example.sh Improved full example and added pkill-P version. 4 years ago
all.sh Renamed all.sh to all-full-example.sh so all.sh can be just the kill_child_jobs() function. 4 years ago
bash.sh Add solution using while kill %%. 4 years ago
dash.sh Add version that works in dash but leaves jobs running in zsh. 4 years ago
noop.sh kill_child_jobs() implementation that does nothing for testing. 4 years ago
pkill-P-full-example.sh Improved full example and added pkill-P version. 4 years ago
pkill-P.sh Add example of killing all child processes. 4 years ago
zsh.sh Make zsh.sh into a test case. 4 years ago

README.md

kill-child-jobs

Examples of how to kill all child jobs when a shell script exits.