-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Running Nix under strace, I see lots of invalid close syscalls #1506
Comments
Upon further inspection, this appears to be intentional: https://github.com/NixOS/nix/blob/1.11.13/src/libutil/util.cc#L1035-L1043 I'll leave this open to make sure this is intentional. |
As sad it sounds, that is the portable way of closing all file descriptors (ensuring you don't leak them to the builds for example). https://stackoverflow.com/questions/899038/getting-the-highest-allocated-file-descriptor/918469#918469 for the non-portable ways of doing the same thing. |
Can we not get away with |
No, since the process could have inherited non- |
Boo, okay. I guess I'll close this then 😦 |
Lovely, thanks @edolstra |
See here:
I can't find anything obvious in the Nix source code that would cause that behavior, but I figured I'd point it out, since it seems like wasted effort.
I'm on 1.11.13.
cc @shlevy @domenkozar @edolstra
The text was updated successfully, but these errors were encountered: