Move the SetCtrlHandler call before the firing of the event.
This commit is contained in:
parent
870b417855
commit
3a4a097163
1 changed files with 1 additions and 1 deletions
|
|
@ -719,8 +719,8 @@ def kill(pidfile, signal=SIG, succmsg="", errmsg="",
|
||||||
# Windows can only send a SIGINT-like signal to
|
# Windows can only send a SIGINT-like signal to
|
||||||
# *every* process spawned off the same console, so we must
|
# *every* process spawned off the same console, so we must
|
||||||
# avoid killing ourselves here.
|
# avoid killing ourselves here.
|
||||||
GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0)
|
|
||||||
SetConsoleCtrlHandler(None, True)
|
SetConsoleCtrlHandler(None, True)
|
||||||
|
GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue