mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-12-26 13:05:24 +00:00
17 lines
404 B
JavaScript
17 lines
404 B
JavaScript
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;
|
|
};
|