process: create stdin with manualStart: true

Otherwise Node.js will try to read data from the handle.
This causes issues when Node.js is already reading from the
same handle, but a different associated stream
(e.g. a possible IPC channel).

PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Anna Henningsen committed 2018-05-14 19:19:32 +02:00
1 parent f2ad1d5d22
commit c8fe8e8f5d
1 file changed
+4 -2
+4 -2
View File
@@ -77,13 +77,15 @@ function setupStdio() {
stdin = new net.Socket({
handle: process.channel,
readable: true,
writable: false
writable: false,
manualStart: true
});
} else {
stdin = new net.Socket({
fd: fd,
readable: true,
writable: false
writable: false,
manualStart: true
});
}
// Make sure the stdin can't be `.end()`-ed