-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flexible stdios for IPC #20000
Comments
No. If fds in child processes are non-blocking, then that's simply a bug. |
@bnoordhuis - I suggest we:
It may be that we have one or two minor issues that need fixing, but given the number of open (and closed) issues on this topic, I guess having a child_process specification document helps users at large. |
Ping @gireeshpunathil ... does this need to remain open? Is there more to do? |
With many stable versions released and used in the field with the current behavior, and we haven't heard any issues related to these topics in the recent past, I would assume that the applications have adapted to the way Node.js handles If we all are in agreement, then we could not only close this, but all the referenced issues too. I would like to seek consensus: @nodejs/child_process |
A noted problem pattern is broken data flow when i) spawning OS commands that predate Node.js and that do not expect their stdios to be non-blocking. ii) Composite IPC that involves more than one Node process in the process chain.
The underlying issue is the mixed mode I/O in a number of variations based on number of parent-child combo that is possible.
While many of these can be mitigated by studying the I/O characteristics of parent and child and crafting a suitable IPC that works, inability to (programatically) control the blocking behavior (flow mode) of the stdio channel causes usability issues.
Proposals:
Node parent -> non-Node child
Node parent - Node child
process.exit()
#6773)Node parent - non-Node child -> Node grand child
Node parent - non-Node child -> non-Node grand child
references:
truncated stdout on porcess exit: #19218 #784 #6456 #6379
pre-fabricated duplex streams for IPC: #16553 #15714 #13542
inconsistent IPC with process chain: #9413
unexpected flow mode for stdio: #14752 #18446 #19838
The text was updated successfully, but these errors were encountered: