Skip to content

@mmalecki /child.js
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Close child's stdin
console.log('Hello');
var stdin = process.openStdin();
stdin.on('data', function (d) {
console.log('Oh, I can exit now');
stdin.pause();
});
process.on('exit', function () {
console.log('Oh, I am exitting now');
});
setTimeout(function () {
console.log('real exit');
}, 1000);
var spawn = require('child_process').spawn;
var c = spawn('node', ['child.js']);
c.stdin.destroy();
c.stdout.pipe(process.stdout);
c.stderr.pipe(process.stderr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.