-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: ensure /dev/null
fd is closed on failure
#47525
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
Conversation
Maybe we can break early for stdin (avoids unnecessary file calls) since we know that we don't support the ignore or pipe option for this handle ?
|
e9ac738
to
c56db6a
Compare
c56db6a
to
e0d109a
Compare
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.
Thank you both! Appreciate it.
9ba5a32
to
da59711
Compare
Release Notes Persisted
|
I have automatically backported this PR to "36-x-y", please check out #47541 |
I have automatically backported this PR to "35-x-y", please check out #47542 |
I have automatically backported this PR to "37-x-y", please check out #47543 |
Description of Change
Closes #47515.
Previously we were opening a handle to
/dev/null
and never remapping it, so it would be leaked as we never explicitly closed it. This fixes that.Upstream in this case just called
_exit
which terminates the process and closes open file descriptors belonging to the process, which s why they didn't have this issue.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where utility processes could leak file handles.