mirror of
https://github.com/NixOS/nix
synced 2025-07-06 05:01:48 +02:00
Merge pull request #11278 from Mic92/close-fds
libutil: rename and optimize closeMostFDs
This commit is contained in:
commit
8bd835b7bc
3 changed files with 28 additions and 8 deletions
|
@ -154,10 +154,10 @@ public:
|
|||
namespace unix {
|
||||
|
||||
/**
|
||||
* Close all file descriptors except those listed in the given set.
|
||||
* Close all file descriptors except stdio fds (ie 0, 1, 2).
|
||||
* Good practice in child processes.
|
||||
*/
|
||||
void closeMostFDs(const std::set<Descriptor> & exceptions);
|
||||
void closeExtraFDs();
|
||||
|
||||
/**
|
||||
* Set the close-on-exec flag for the given file descriptor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue