Open bushig opened 7 years ago
I believe that by UNIX guidelines, SIGKILL cannot be trapped.
What I think bushig meant is not to trap any SIGKILL, but to not send any SIGKILL to processes if you don't want to. I have some processes that might take more than 5 seconds to gracefully stop, and honcho is killing them if they don't terminate in these 5 seconds. Disabling these behavior (or customizing it) through a command line argument would be great.
So instead of:
KILL_WAIT = 5
it could be something like this:
KILL_WAIT = os.environ.get('KILL_WAIT', 5)
Ah I see I misread that. Also it would probably be best to set KILL_WAIT to something sensible if the value passed in is bogus (say a string or negative value) for some reason.
There should be a way to prevent sending SIGKILL to all processes on 5 seconds timeout. What about making KILL_WAIT environmental variable?