Skip to content

Commit c8fe8e8

Browse files
committed
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: #19377 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f2ad1d5 commit c8fe8e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/internal/process/stdio.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ function setupStdio() {
7777
stdin = new net.Socket({
7878
handle: process.channel,
7979
readable: true,
80-
writable: false
80+
writable: false,
81+
manualStart: true
8182
});
8283
} else {
8384
stdin = new net.Socket({
8485
fd: fd,
8586
readable: true,
86-
writable: false
87+
writable: false,
88+
manualStart: true
8789
});
8890
}
8991
// Make sure the stdin can't be `.end()`-ed

0 commit comments

Comments
 (0)