title: Nodejs always cann't capture child process's stdout data completely, unless child process fllush(stdout)
body: <p>I use nodejs to captured its child process's stdout data, but always captured the former part of child process's stdout data. When I add <strong>fllush(stdout)</strong>，It works OK. But I don't know why, and don't want to add flush(stdout).</p>
  
  <p>Here is my code:    </p>
  
  <pre><code>var tail_child = spawn(exefile, [arg1, arg2, arg3]);
  tail_child.stdin.write('msg\n');    
  tail_child.stdout.on('data', function(data) {    
      console.log(data);    
  });
  </code></pre>
  
  <p>child_process.c</p>
  
  <pre><code>printf("data\n");
  </code></pre>
  
  <p>Need your help! Thank you very much!</p>