From: Fedor Indutny Date: Sat, 21 Mar 2015 23:19:04 +0000 (-0700) Subject: node: ensure that streams2 won't `.end()` stdin X-Git-Tag: v1.6.2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ae1a612149c27d4ffc6e8e6561d4845ad786674;p=platform%2Fupstream%2Fnodejs.git node: ensure that streams2 won't `.end()` stdin Stdin is purely read-only stream. Although, `net.Socket` might be used to create it if stdin is in fact a Pipe or TCP socket, the `stream.Duplex` should not try to call `.end()` on it. Fix: https://github.com/iojs/io.js/issues/1068 PR-URL: https://github.com/iojs/io.js/pull/1233 Reviewed-By: Chris Dickinson --- diff --git a/src/node.js b/src/node.js index 7215f74..dbadc66 100644 --- a/src/node.js +++ b/src/node.js @@ -630,6 +630,8 @@ writable: false }); } + // Make sure the stdin can't be `.end()`-ed + stdin._writableState.ended = true; break; default: