Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Kill process when father process ends with Control C
- SIGINT=2
- trap 'clean_exit' $SIGINT
- # other thgs in your main prog
- function clean_exit(){
- # define SIGTERM and your $pid according to your need
- kill -$SIGTERM $pid
- #other things to do
- }
Add Comment
Please, Sign In to add comment