1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 18:29:36 +01:00

Merge pull request #14607 from NixOS/open-directory-cloexec

libutil/unix: Add O_CLOEXEC to openDirectory
This commit is contained in:
John Ericson 2025-11-21 01:23:57 +00:00 committed by GitHub
commit 152e7e48c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ namespace nix {
Descriptor openDirectory(const std::filesystem::path & path) Descriptor openDirectory(const std::filesystem::path & path)
{ {
return open(path.c_str(), O_RDONLY | O_DIRECTORY); return open(path.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC);
} }
void setWriteTime( void setWriteTime(