I have a program I run programmatically on Node.js using child_process.
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);
I thought this would work since everything I type into the shell would be piped into the stdin of the spawned process.
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.
Any clue?