signal.js 290 B

12345678910111213141516
  1. #!/usr/bin/env node
  2. const flaggedRespawn = require('../../');
  3. flaggedRespawn(['--harmony'], process.argv, function (ready, child) {
  4. if (ready) {
  5. setTimeout(function() {
  6. process.exit();
  7. }, 100);
  8. } else {
  9. console.log('got child!');
  10. child.kill('SIGHUP');
  11. }
  12. });