3
I would like to send a SIGTERM signal to a nohup process, but this signal is completely ignored, only SIGKILL works, which is considered a bad choice to terminate a shell script. Do I have any options here or do I have to stick to SIGKILL? Thanks in advance.
1You may want to take this to unix.stackexchange.com – Ali – 2012-11-13T18:40:04.817
I'm pretty sure
– Frédéric Hamidi – 2012-11-13T18:48:24.870nohup
is not supposed to trapSIGTERM
, unless you happen to be using the 4.3 BSD version. Maybe the script itself is ignoring the signal?so sigterm is masked as well, check for external executions inside your bash script and find which one is responsible, you may find an alternative solution – None – 2012-11-13T18:50:16.480
If the author of the program made it ignore SIGTERM, surely he will have documented a way to stop it. Perhaps it really does want SIGKILL. Without access to information about this particular program, we can only guess. – tripleee – 2012-11-13T18:53:26.417
Did you try
SIGQUIT
(beforeSIGKILL
)? – Basile Starynkevitch – 2012-11-13T19:17:48.893