title: How to let user type in data into a spawned process on Node.js
body: <p>I have a program I run programmatically on Node.js using child_process.</p>
  
  <pre><code>var spawnedProcess = childProcess.spawn(command, args);
  
  spawnedProcess.stdout.setEncoding("utf8");
  spawnedProcess.stdout.on("data", function(data) {
    return process.stdout.write(data);
  });
  
  process.stdin.pipe(spawnedProcess.stdin);
  </code></pre>
  
  <p>I thought this would work since everything I type into the shell would be piped into the stdin of the spawned process.</p>
  
  <p>I can see what I am typing and when I hit Enter it just give me a new line. The shell isn't responding to any input.</p>
  
  <p>Any clue?</p>