mirror of
https://github.com/NixOS/nix.git
synced 2025-12-08 18:11:02 +01:00
libutil: Get rid of TODO comments for O_CLOEXEC
By default windows doesn't allow inheriting handles anyway. These comments are just confusing at this point.
This commit is contained in:
parent
1d56f413c2
commit
22f993fab6
1 changed files with 4 additions and 8 deletions
|
|
@ -260,8 +260,7 @@ std::string readFile(const Path & path)
|
|||
AutoCloseFD fd = toDescriptor(open(
|
||||
path.c_str(),
|
||||
O_RDONLY
|
||||
// TODO
|
||||
#ifndef _WIN32
|
||||
#ifdef O_CLOEXEC
|
||||
| O_CLOEXEC
|
||||
#endif
|
||||
));
|
||||
|
|
@ -294,8 +293,7 @@ void readFile(const Path & path, Sink & sink, bool memory_map)
|
|||
AutoCloseFD fd = toDescriptor(open(
|
||||
path.c_str(),
|
||||
O_RDONLY
|
||||
// TODO
|
||||
#ifndef _WIN32
|
||||
#ifdef O_CLOEXEC
|
||||
| O_CLOEXEC
|
||||
#endif
|
||||
));
|
||||
|
|
@ -309,8 +307,7 @@ void writeFile(const Path & path, std::string_view s, mode_t mode, FsSync sync)
|
|||
AutoCloseFD fd = toDescriptor(open(
|
||||
path.c_str(),
|
||||
O_WRONLY | O_TRUNC | O_CREAT
|
||||
// TODO
|
||||
#ifndef _WIN32
|
||||
#ifdef O_CLOEXEC
|
||||
| O_CLOEXEC
|
||||
#endif
|
||||
,
|
||||
|
|
@ -344,8 +341,7 @@ void writeFile(const Path & path, Source & source, mode_t mode, FsSync sync)
|
|||
AutoCloseFD fd = toDescriptor(open(
|
||||
path.c_str(),
|
||||
O_WRONLY | O_TRUNC | O_CREAT
|
||||
// TODO
|
||||
#ifndef _WIN32
|
||||
#ifdef O_CLOEXEC
|
||||
| O_CLOEXEC
|
||||
#endif
|
||||
,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue