mirror of
https://github.com/NixOS/nix.git
synced 2025-11-22 18:29:36 +01:00
libutil/unix: Add O_CLOEXEC to openDirectory
As a precaution. This function might get used for some long persisted file descriptor and we need good defaults.
This commit is contained in:
parent
5caebab63a
commit
ea4854fda1
1 changed files with 1 additions and 1 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue