Re:Kill Me Softly – Kill processes in a reliable manner
by ad_hominem on Tuesday December 16, 2014 @02:09PM
(#8758705)
SIGUSR1 is often caught by applications for their own IPC. SIGQUIT would probably be a safer one to send, but that can also be caught and repurposed. Sending other signal types would definitely have to be opt-in to prevent unintended side effects.
Re:Kill Me Softly – Kill processes in a reliable manner
by alanfranzoni on Tuesday December 16, 2014 @12:51PM
(#8758241)
Yes, of course that would be useful, something is already in the TODOs. I don't want to overcomplicate what is a simple shell script by the way. Reaping may be interesting, ptrace may be a bit of overkill. Thanks.
* Send SIGUSR1 if TERM doesn't work
* Send SIGCONT if TERM doesn't work
* Attempt to reap the process
* Attempt to ptrace the process
* Give a hint as to why it can't be killed (like blocked I/O, a zombie, etc)
* Kill the process group (dangerous!)