1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

Put some file descriptor functions in unix and windows namespaces

It is misleading when platform-specific functions are in the overall
`nix` namespace. More namespaces also makes for nicer doxygen.
This commit is contained in:
John Ericson 2024-06-13 10:34:44 -04:00
parent afdd12be5e
commit ff87c1a318
7 changed files with 19 additions and 15 deletions

View file

@ -546,7 +546,7 @@ std::pair<AutoCloseFD, Path> createTempFile(const Path & prefix)
if (!fd)
throw SysError("creating temporary file '%s'", tmpl);
#ifndef _WIN32
closeOnExec(fd.get());
unix::closeOnExec(fd.get());
#endif
return {std::move(fd), tmpl};
}