Timeline for How to write a bash script that traps SIGTERM and kills the process and all sub-processes immediately
Current License: CC BY-SA 3.0
Post Revisions
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 30, 2016 at 18:09 | comment | added | Gavriel | @SamiLaine, interesting, I'll have a try tomorrow with my original code (java instead of sleep) | |
| Jan 30, 2016 at 16:21 | comment | added | user192911 | Could the sleep be the problem? Any traps you have in place would not be executed before sleep has ended (for more on this, see this question in SO). | |
| Jan 24, 2016 at 14:18 | comment | added | Gavriel | I think you mix it with SIGKILL. I did trap TERM, because without the trap line the script exits immediately when I sent the signal, while with the trap 'echo hello' SIGTERM it does not exit, and it prints hello, just not right away | |
| Jan 24, 2016 at 9:37 | history | asked | Gavriel | CC BY-SA 3.0 |