child_process: flush consuming streams · nodejs/node@7793c36 · GitHub
Skip to content

Commit 7793c36

Browse files
Davervagg
authored andcommitted
child_process: flush consuming streams
When a client calls read() with a nonzero argument on a Socket, that Socket sets this._consuming to true. It never sets this._consuming back to false. ChildProcess.flushStdio() currently doesn't flush any streams where _consuming is truthy. But, that means that it never flushes any stream that has ever been read from. This prevents a child process from ever closing if one of its streams has been read from, causing issue #4049. This commit allows consuming streams to be flushed, and the child process to emit a close event. Fixes: #4049 PR-URL: #4071 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 22b0971 commit 7793c36

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

lib/internal/child_process.js

Lines changed: 1 addition & 1 deletion
Lines changed: 17 additions & 0 deletions

0 commit comments

Comments
 (0)