-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
child_process 'close' always (?) emitted after 'exit' #37998
Comments
IMO this is a documentation issue, or at least this is the expected original behavior of 'close'. IMO this is also reflected in the callback arguments, which are either an exit code or a kill signal, which can only be provided if the process is finished. I'm not saying that the current behavior is correct, just that it's IMO what I would expect from the documentation. |
@Linkgoron That’s fair, and it’s okay to say we don’t want to break this behavior by changing it, but in that case, it would really be nice to document this. |
clarify the 'close' event description in the child_process docs. fixes: nodejs#37998
clarify the 'close' event description in the child_process docs. fixes: #37998 PR-URL: #38181 Fixes: #37998 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
clarify the 'close' event description in the child_process docs. fixes: #37998 PR-URL: #38181 Fixes: #37998 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
clarify the 'close' event description in the child_process docs. fixes: #37998 PR-URL: #38181 Fixes: #37998 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
'close' should be emitted immediately (all stdio streams are closed), 'exit' after 5 seconds
What do you see instead?
5 seconds pass, then 'exit' is emitted and then 'closed'
The text was updated successfully, but these errors were encountered: