From 22552e593e59a98693218468c2f6e13106c09a5d 2011-04-20 21:02:00 From: MinRK Date: 2011-04-20 21:02:00 Subject: [PATCH] interrupt windows subprocesses with CTRL-C instead of SIGINT CTRL_C_EVENT is new in 2.7 --- diff --git a/IPython/parallel/apps/launcher.py b/IPython/parallel/apps/launcher.py index 53671ec..f5b7d7f 100644 --- a/IPython/parallel/apps/launcher.py +++ b/IPython/parallel/apps/launcher.py @@ -25,6 +25,7 @@ from signal import SIGINT, SIGTERM try: from signal import SIGKILL except ImportError: + # windows SIGKILL=SIGTERM from subprocess import Popen, PIPE, STDOUT @@ -60,6 +61,14 @@ except ImportError: 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 #-----------------------------------------------------------------------------