Skip to content

Instantly share code, notes, and snippets.

@isaacs
Last active December 10, 2015 23:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/4506976 to your computer and use it in GitHub Desktop.
Save isaacs/4506976 to your computer and use it in GitHub Desktop.
var spawn = require('child_process').spawn
var child = spawn('bash', [], { stdio: 'inherit' })
child.on('exit', function(code, signal) {
console.error('ok=%j (%j)', !!signal, signal)
process.exit(signal ? 0 : 1)
});
setTimeout(function() {
child.kill('SIGKILL')
}, 200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment