Intent: call an external application with specified arguments, and exit script.
The following script does not work as it should:
#!/usr/bin/node
va
My solution to this problem:
app.js
require('./spawn.js')('node worker.js');
spawn.js
module.exports = function( command ) {
require('child_process').fork('./spawner.js', [command]);
};
spawner.js
require('child_process').exec(
'start cmd.exe @cmd /k "' + process.argv[2] + '"',
function(){}
);
process.abort(0);