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.
16 lines
404 B
16 lines
404 B
var spawn = require('child_process').spawn; |
|
|
|
module.exports = function(argv) { |
|
var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' }); |
|
child.on('exit', function(code, signal) { |
|
process.on('exit', function() { |
|
/* istanbul ignore if */ |
|
if (signal) { |
|
process.kill(process.pid, signal); |
|
} else { |
|
process.exit(code); |
|
} |
|
}); |
|
}); |
|
return child; |
|
};
|
|
|