版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 rivejä
407 B

  1. var spawn = require('child_process').spawn;
  2. module.exports = function (argv) {
  3. var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' });
  4. child.on('exit', function (code, signal) {
  5. process.on('exit', function () {
  6. /* istanbul ignore if */
  7. if (signal) {
  8. process.kill(process.pid, signal);
  9. } else {
  10. process.exit(code);
  11. }
  12. });
  13. });
  14. return child;
  15. };