##// END OF EJS Templates
prevent infinite Controllers on Windows...
MinRK -
Show More
@@ -405,6 +405,19 b' class IPControllerApp(BaseParallelApplication):'
405
405
406 def launch_new_instance():
406 def launch_new_instance():
407 """Create and run the IPython controller"""
407 """Create and run the IPython controller"""
408 if sys.platform == 'win32':
409 # make sure we don't get called from a multiprocessing subprocess
410 # this can result in infinite Controllers being started on Windows
411 # which doesn't have a proper fork, so multiprocessing is wonky
412
413 # this only comes up when IPython has been installed using vanilla
414 # setuptools, and *not* distribute.
415 import inspect
416 for record in inspect.stack():
417 frame = record[0]
418 if frame.f_locals.get('__name__') == '__parents_main__':
419 # we are a subprocess, don't start another Controller!
420 return
408 app = IPControllerApp.instance()
421 app = IPControllerApp.instance()
409 app.initialize()
422 app.initialize()
410 app.start()
423 app.start()
General Comments 0
You need to be logged in to leave comments. Login now