From e0418cfde05f07ad60662f72a672a19f28173277 2009-11-12 02:06:11 From: Brian Granger Date: 2009-11-12 02:06:11 Subject: [PATCH] Doing ipcluster stop on windows will now simply remove the .pid file. --- diff --git a/IPython/kernel/ipclusterapp.py b/IPython/kernel/ipclusterapp.py index fcbe29e..dccafcf 100644 --- a/IPython/kernel/ipclusterapp.py +++ b/IPython/kernel/ipclusterapp.py @@ -388,12 +388,18 @@ class IPClusterApp(ApplicationWithClusterDir): # Here I exit with a unusual exit status that other processes # can watch for to learn how I existed. self.exit(ALREADY_STOPPED) - sig = config.Global.signal - self.log.info( - "Stopping cluster [pid=%r] with [signal=%r]" % (pid, sig) - ) - os.kill(pid, sig) - + else: + if os.name=='posix': + sig = config.Global.signal + self.log.info( + "Stopping cluster [pid=%r] with [signal=%r]" % (pid, sig) + ) + os.kill(pid, sig) + elif os.name='nt': + # As of right now, we don't support daemonize on Windows, so + # stop will not do anything. Minimally, it should clean up the + # old .pid files. + self.remove_pid_file() def launch_new_instance(): """Create and run the IPython cluster."""