honcho icon indicating copy to clipboard operation
honcho copied to clipboard

Preventing SIGKILL

Open bushig opened this issue 7 years ago • 4 comments

There should be a way to prevent sending SIGKILL to all processes on 5 seconds timeout. What about making KILL_WAIT environmental variable?

bushig avatar Mar 15 '17 21:03 bushig

I believe that by UNIX guidelines, SIGKILL cannot be trapped.

bsergean avatar Jan 03 '20 03:01 bsergean

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.

ghost avatar Oct 15 '21 18:10 ghost

So instead of:

KILL_WAIT = 5

it could be something like this:

KILL_WAIT = os.environ.get('KILL_WAIT', 5)

rafrafek avatar Oct 24 '22 15:10 rafrafek

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.

bsergean avatar Oct 24 '22 15:10 bsergean