nix-rust / nix

Rust friendly bindings to *nix APIs
MIT License
2.68k stars 668 forks source link

unistd: adding linux(glibc)/freebsd close_range. #2525

Open devnexen opened 1 month ago

devnexen commented 1 month ago

Allows to close a range of file descriptors, can set close-on-exec on these and/or unsharing (as having its own file descriptors table after fork for the calling process).

What does this PR do

Checklist:

SteveLauC commented 1 month ago

I restarted the Linux/glibc CI as the error is not related to the PR

devnexen commented 1 month ago

FreeBSD issue will be fixed once this PR is merged and released.