diff --git a/lib/child_process.js b/lib/child_process.js index d46caae4b6a..d07d244777c 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;