4 ms·
You are probably looking for help at the wrong website---anyway, just let me know if that helps. suspense_cleanup () { echo "Suspense clean up..."
by tmcb 3y ago
You are probably looking for help at the wrong website---anyway, just let me know if that helps.
suspense_cleanup () {
echo "Suspense clean up..."
exit 0
}
int_cleanup () {
echo "Int clean up..."
exit 0
}
trap 'suspense_cleanup' SIGTSTP
trap 'int_cleanup' SIGINT
sleep 600 & wait
- httbs 3y agoYes sorry, I just wanted to come to a place with some experts. I tried some other popular sites with little luck. Anyway, that works, thanks! So it seems that trapping SIGTSTP works, so long as the script is currently executing an asynchronous command that is followed by a "wait", at the time when the user presses Ctrl-z. Did I get it right? I need to read a bit on this topic.
- deleted 3y ago[deleted]