child_process: handle writeUtf8String error
authorFedor Indutny <fedor@indutny.com>
Sat, 12 Jul 2014 09:35:26 +0000 (12:35 +0300)
committerFedor Indutny <fedor@indutny.com>
Sat, 12 Jul 2014 09:35:26 +0000 (12:35 +0300)
When handling `writeUtf8String` error, return after emitting it.
Otherwise a runtime failure can occur.

fix #7923

lib/child_process.js

index a07f2d1..e19f4ff 100644 (file)
@@ -466,6 +466,7 @@ function setupChannel(target, channel) {
                               'write',
                               'cannot write to IPC channel.');
       this.emit('error', er);
+      return;
     } else if (handle && !this._handleQueue) {
       this._handleQueue = [];
     }