Commit 4dec12fc authored by Max Kellermann's avatar Max Kellermann

system/FileDescriptor: move O_NOCTTY|O_CLOEXEC to Open()

parent 57ad3aca
......@@ -60,14 +60,14 @@
bool
FileDescriptor::Open(const char *pathname, int flags)
{
fd = ::open(pathname, flags);
fd = ::open(pathname, flags | O_NOCTTY | O_CLOEXEC);
return IsDefined();
}
bool
FileDescriptor::OpenReadOnly(const char *pathname)
{
return Open(pathname, O_RDONLY | O_NOCTTY | O_CLOEXEC);
return Open(pathname, O_RDONLY);
}
#ifndef WIN32
......@@ -75,7 +75,7 @@ FileDescriptor::OpenReadOnly(const char *pathname)
bool
FileDescriptor::OpenNonBlocking(const char *pathname)
{
return Open(pathname, O_RDWR | O_NOCTTY | O_CLOEXEC | O_NONBLOCK);
return Open(pathname, O_RDWR | O_NONBLOCK);
}
bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment