mirror of
https://github.com/NixOS/nix.git
synced 2025-12-10 19:11:03 +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(
|
AutoCloseFD fd = toDescriptor(open(
|
||||||
path.c_str(),
|
path.c_str(),
|
||||||
O_RDONLY
|
O_RDONLY
|
||||||
// TODO
|
#ifdef O_CLOEXEC
|
||||||
#ifndef _WIN32
|
|
||||||
| O_CLOEXEC
|
| O_CLOEXEC
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
@ -294,8 +293,7 @@ void readFile(const Path & path, Sink & sink, bool memory_map)
|
||||||
AutoCloseFD fd = toDescriptor(open(
|
AutoCloseFD fd = toDescriptor(open(
|
||||||
path.c_str(),
|
path.c_str(),
|
||||||
O_RDONLY
|
O_RDONLY
|
||||||
// TODO
|
#ifdef O_CLOEXEC
|
||||||
#ifndef _WIN32
|
|
||||||
| O_CLOEXEC
|
| O_CLOEXEC
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
@ -309,8 +307,7 @@ void writeFile(const Path & path, std::string_view s, mode_t mode, FsSync sync)
|
||||||
AutoCloseFD fd = toDescriptor(open(
|
AutoCloseFD fd = toDescriptor(open(
|
||||||
path.c_str(),
|
path.c_str(),
|
||||||
O_WRONLY | O_TRUNC | O_CREAT
|
O_WRONLY | O_TRUNC | O_CREAT
|
||||||
// TODO
|
#ifdef O_CLOEXEC
|
||||||
#ifndef _WIN32
|
|
||||||
| O_CLOEXEC
|
| O_CLOEXEC
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
|
|
@ -344,8 +341,7 @@ void writeFile(const Path & path, Source & source, mode_t mode, FsSync sync)
|
||||||
AutoCloseFD fd = toDescriptor(open(
|
AutoCloseFD fd = toDescriptor(open(
|
||||||
path.c_str(),
|
path.c_str(),
|
||||||
O_WRONLY | O_TRUNC | O_CREAT
|
O_WRONLY | O_TRUNC | O_CREAT
|
||||||
// TODO
|
#ifdef O_CLOEXEC
|
||||||
#ifndef _WIN32
|
|
||||||
| O_CLOEXEC
|
| O_CLOEXEC
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue