nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.59k stars 145 forks source link

Preventing SIGKILL #189

Open bushig opened 7 years ago

bushig commented 7 years ago

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

bsergean commented 4 years ago

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

ghost commented 2 years ago

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.

rafrafek commented 1 year ago

So instead of:

KILL_WAIT = 5

it could be something like this:

KILL_WAIT = os.environ.get('KILL_WAIT', 5)
bsergean commented 1 year ago

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.