You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

462 B

Child Process Module

  • spawn
var spawn = require('child_process').spawn;
var child = spawn('some-command', ['--with', 'flags'])
child.stdout.on('data', function (data) {...})
child.stderr.on('data', function (data) {...})
child.on('exit', function (code) {...})
child.kill('SIGKILL')
  • execFile
var execFile = require('child_process').execFile;
execFile('some-command', ['flags'], null, function (err, stdout, stderr) {
})