diff --git a/IPython/lib/irunner.py b/IPython/lib/irunner.py index 5c97cfa..c132f58 100755 --- a/IPython/lib/irunner.py +++ b/IPython/lib/irunner.py @@ -263,7 +263,8 @@ class InteractiveRunner(object): # Leave the child ready for more input later on, otherwise select just # hangs on the second invocation. - c.send('\n') + if c.isalive(): + c.send('\n') # Return any requested output if get_output: