summaryrefslogtreecommitdiff
path: root/pexpect
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-10-08 18:45:04 -0700
committerThomas Kluyver <takowl@gmail.com>2013-10-08 18:45:04 -0700
commit4ad916b5e8818118f4e60075eaefdc2aa897a270 (patch)
tree583afdfe3e235697c8bd5e57db15d26788d8af0d /pexpect
parent994e4e85df6ee54cde9377d722d3f4fef53e1de2 (diff)
downloadpexpect-4ad916b5e8818118f4e60075eaefdc2aa897a270.tar.gz
Ignore SIGHUP by default, for backwards compatibility
Diffstat (limited to 'pexpect')
-rw-r--r--pexpect/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py
index 1cdbc24..c9f78a5 100644
--- a/pexpect/__init__.py
+++ b/pexpect/__init__.py
@@ -309,7 +309,7 @@ class spawn(object):
def __init__(self, command, args=[], timeout=30, maxread=2000,
searchwindowsize=None, logfile=None, cwd=None, env=None,
- ignore_sighup=False):
+ ignore_sighup=True):
'''This is the constructor. The command parameter may be a string that
includes a command and any arguments to the command. For example::
@@ -389,6 +389,11 @@ class spawn(object):
self.logfile_send = fout
+ If ``ignore_sighup`` is True, the child process will ignore SIGHUP
+ signals. For now, the default is True, to preserve the behaviour of
+ earlier versions of Pexpect, but you should pass this explicitly if you
+ want to rely on it.
+
The delaybeforesend helps overcome a weird behavior that many users
were experiencing. The typical problem was that a user would expect() a
"Password:" prompt and then immediately call sendline() to send the