Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var util = require('util'),
spawn = require('child_process').spawn;
function s(img) {
var p = spawn(s);
p.stdout.on('data', function (data) {
console.log(s + ': stdout: ' + data);
});
p.stderr.on('data', function (data) {
console.log(s + ': stderr: ' + data);
});
p.on('exit', function (code) {
console.log(s + ': child process exited with code ' + code);
});
}
s('notepad');
s('calc');
s('regedit');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.