-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a SIGKILL to second ctrl+c #2621
Conversation
Codecov ReportBase: 88.614% // Head: 88.456% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2621 +/- ##
=============================================
- Coverage 88.614% 88.456% -0.158%
=============================================
Files 81 81
Lines 6684 6636 -48
Branches 1142 1130 -12
=============================================
- Hits 5923 5870 -53
- Misses 524 527 +3
- Partials 237 239 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Did you check how this behaves on Windows? IIRC, terminate already works the same as kill, and also KeyboardInterrupt may be received by any of the processes. Also, might consider only handling second Ctrl-C after a slight delay, as it is quite easy to accidentally hit it twice, but this is also not of that much importance (I don't mind if there is no delay required). |
Nope, will check. |
I realize that is irrelevant since we do this: if not OS_IS_WINDOWS:
from signal import SIGKILL
else:
SIGKILL = SIGINT For Windows, the behavior is no different than it is today. |
Hitting
ctrl+c
sends SIGINT to do a graceful shutdown on each worker process. Subsequentctrl+c
currently do nothing.This PR adds functionality so that the second
ctrl+c
will send a SIGKILL to the processes for immediate shutdown.