Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created April 6, 2012 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/2321917 to your computer and use it in GitHub Desktop.
Save isaacs/2321917 to your computer and use it in GitHub Desktop.
diff --git a/lib/child_process.js b/lib/child_process.js
index d46caae..d07d244 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -120,7 +120,8 @@ function setupChannel(target, channel) {
var writeReq = channel.write(buffer, 0, buffer.length, sendHandle);
if (!writeReq) {
- throw errnoException(errno, 'write', 'cannot write to IPC channel.');
+ var er = errnoException(errno, 'write', 'cannot write to IPC channel.');
+ this.emit('error', er);
}
writeReq.oncomplete = nop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment