Permalink
Browse files

interrupt windows subprocesses with CTRL-C instead of SIGINT

CTRL_C_EVENT is new in 2.7
  • Loading branch information...
1 parent 3e8626a commit 22552e593e59a98693218468c2f6e13106c09a5d @minrk committed Apr 13, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 IPython/parallel/apps/launcher.py
@@ -25,6 +25,7 @@
try:
from signal import SIGKILL
except ImportError:
+ # windows
SIGKILL=SIGTERM
from subprocess import Popen, PIPE, STDOUT
@@ -60,6 +61,14 @@ def check_output(*args, **kwargs):
pass
WINDOWS = os.name == 'nt'
+
+if WINDOWS:
+ try:
+ # >= 2.7, 3.2
+ from signal import CTRL_C_EVENT as SIGINT
+ except ImportError:
+ pass
+
#-----------------------------------------------------------------------------
# Paths to the kernel apps
#-----------------------------------------------------------------------------

0 comments on commit 22552e5

Please sign in to comment.