-
Notifications
You must be signed in to change notification settings - Fork 142
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
avoid SIGINT on Windows #94
Conversation
Before:
After:
|
For the example counter that ignores sigterms, because we don't cancel the sigterm timer that's already been scheduled, it's going to have a misleading error message printed 5s after sigint which will again say that sigint is being escalated to sigterm. Shall we cancel that timer to prevent the second sigterm and the message? |
I also tested this on Windows and had the same before and after output as William. |
We cannot cancel the I don't think it will be misleading because it will simply send SIGTERM twice, and the first time the warning message will indicate that is because it cannot send SIGINT as requested. Also, the counter doesn't work right on Windows because you cannot ignore |
I still need a code review so that I can run CI. |
Thanks for the review @dhood! CI: |
This is required to avoid a (non-fatal, but annoying) traceback on Windows when launch tries to send SIGINT to it's children.
This patch automatically escalates to SIGTERM (which does work), which is what the old launch did, and is also what eventually happens with launch now, but only after waiting five seconds. This removes the wait as well.
Eventually this might be fixed with some combination of
creationflags
andsignal.CTRL_C_EVENT
, but that's an ongoing issue with subprocess on Windows.