title: child_process.spawn() isn't waiting for child node process to complete
body: <p>The following works as expected, waiting for 3 seconds before exiting:</p>
  
  <pre><code>child_process.spawn( 'sleep', [3] );
  </code></pre>
  
  <p>but this is exiting immediately, not waiting for 3 seconds as it should (and as it does when this command is run directly:</p>
  
  <pre><code>child_process.spawn( 'node', ['-e', '"setTimeout(null, 3000);"'] );
  </code></pre>
  
  <p>Any ideas as to why? Thanks.</p>
  
  <p><strong>Edit:</strong> <code>spawnSync()</code> behaves the same way in both cases. Also, I'm not expecting the <code>spawn()</code> function to block, I'm expecting the node process to wait for its children to exit before exiting itself.</p>