-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
process: drop pipe after child exits in wait_with_output
#4315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not entirely sure why delaying the IO handle drop would help, but we can easily try it out.
I'm with you, I'd rather understand what's going on before jumping to a fix like this. |
@iitalics You should be able to try out the version of Tokio available in this PR by adding the following to your
If you're able to compare how it performs with and without this change without any other changes, that would be cool. |
I've tested this for about an hour with no crash observed. |
Okay, if adding/removing this patch makes the crash go away and come back, then it seems reasonable to merge this. Not that it makes any sense. |
Drop the stdout/stderr pipes after the child has exited in
wait_with_output
. This will supposedly avoid a crash in some rare circumstances as discussed in #4309.