title: child dies before TIMEOUT in pexpect
body: <p>I am using pexpect in a python code to run a system command. On running the command, the user may or maynot be prompted with a question. if prompted he must answer y. I want this to happen automatically. I have written the following code -</p>
  
  <pre><code>child = pexpect.spawn( "module load xyz" )
  child.expect( "Are you sure you want to clear all loaded modules.*" )
  child.sendline( "y" ) 
  </code></pre>
  
  <p>My question is what will happen if the system does not prompt the user with the question and the child dies after successful execution of the command?</p>
  
  <p>Thanks</p>