Skip to content

Commit

Permalink
child_process: Emit err rather than throw for IPC write failure
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 6, 2012
1 parent d73b257 commit b9bfb1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9bfb1b

Please sign in to comment.