Skip to content

Instantly share code, notes, and snippets.

@lxe
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save lxe/11383597 to your computer and use it in GitHub Desktop.

Select an option

Save lxe/11383597 to your computer and use it in GitHub Desktop.
spawn test
console.log('test test')
var spawn = require('child_process').spawn,
ls = spawn('node', ['runme.js']);
ls.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
ls.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
ls.on('close', function (code) {
console.log('child process exited with code ' + code);
});
@lxe
Copy link
Copy Markdown
Author

lxe commented Apr 28, 2014

node spawn.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment