Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created December 5, 2011 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/9b9491838fb2c30b68ea to your computer and use it in GitHub Desktop.
Save bnoordhuis/9b9491838fb2c30b68ea to your computer and use it in GitHub Desktop.
var exec = require('child_process').exec;
process.stdin.resume();
process.stdin.on('data', function(data) {
console.error('' + data);
});
process.stdin.on('close', function() {
exec('echo OK', function(err, stdout, stderr) {
if (err) throw err;
console.error('stdout: %j', stdout);
console.error('stderr: %j', stderr);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment