Skip to content

child_process.flushStdio: resume _consuming streams

Hey! I'm new here. Tried to follow all the guidelines. Thanks for your attention!

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. child_process.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 (closed).

child_process.flushStdio should flush streams even if their _consuming is set to true. Then it will close even after a read.

Merge request reports

Loading