mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibCore: Fix logic deciding when to open files in non-blocking mode
The if statement for setting the O_NONBLOCK flag was written the other way around, causing Core::File to open files in non-blocking mode, when we didn't actually specify it.
This commit is contained in:
parent
ff970e9295
commit
1367809142
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ int File::open_mode_to_options(OpenMode mode)
|
|||
flags |= O_EXCL;
|
||||
if (!has_flag(mode, OpenMode::KeepOnExec))
|
||||
flags |= O_CLOEXEC;
|
||||
if (!has_flag(mode, OpenMode::Nonblocking))
|
||||
if (has_flag(mode, OpenMode::Nonblocking))
|
||||
flags |= O_NONBLOCK;
|
||||
|
||||
// Some open modes, like `ReadWrite` imply the ability to create the file if it doesn't exist.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue