Skip to content

child_process: fix data loss with readable event

This commit prevents child process stdio streams from being automatically flushed on child process exit/close if a 'readable' event handler has been attached at the time of exit.

Without this, child process stdio data can be lost if the process exits quickly and a read() (e.g. from a 'readable' handler) hasn't had the chance to get called yet.

Fixes: https://github.com/nodejs/node/issues/5034

Merge request reports

Loading