Created
May 11, 2011 08:49
-
-
Save FooBarWidget/966129 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var child_process = require('child_process'); | |
var child = child_process.spawn('ls', ['.']); | |
child.stdin.end(); | |
child.stdout.pipe(process.stdout); | |
child.stderr.pipe(process.stderr); | |
child.on('exit', function() { | |
console.log("Child exited"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.js:181 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: Socket is not writable | |
at WriteStream._writeOut (net.js:392:11) | |
at WriteStream.write (net.js:378:17) | |
at Object.<anonymous> (console.js:61:18) | |
at ChildProcess.<anonymous> (/Users/hongli/foo.js:7:10) | |
at ChildProcess.emit (events.js:67:17) | |
at Socket.<anonymous> (child_process.js:179:12) | |
at Socket.emit (events.js:81:20) | |
at Array.<anonymous> (net.js:834:12) | |
at EventEmitter._tickCallback (node.js:173:26) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment