exec = require('child_process').exec;
child = exec('node child.js');
child.stdout.pipe(process.stdout);
child.kill('SIGKILL');
function wait() {
setTimeout(wait, 1000);
child.kill('SIGKILL');
}
wait();
The above code does not work. The child starts and will continue to write output indefinitely. I can not figure out how to kill this child process. I am running node v0.11.9 in Windows 7. I know that Windows does not use POSIX signals but sending it 'WM_QUIT' results in an exception. Is my best solution to setup an event protocol on stdin?