child_process: Emit err rather than throw for IPC write failure

This commit is contained in:
isaacs 2012-04-06 14:16:09 -07:00
parent d73b257d65
commit b9bfb1bc91

View File

@ -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;