diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-29 08:57:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-29 08:58:13 +0200 |
commit | 0f270afda89ff94b10686f2fdc72ce751f243de5 (patch) | |
tree | f82a662b872bae156bd5d4b36158b2c623dc3e4d /Kernel | |
parent | d454926e0fccd71706586cf8d58e83e7cc4f92b5 (diff) | |
download | serenity-0f270afda89ff94b10686f2fdc72ce751f243de5.zip |
Kernel: Let's allow unsetting non-blocking mode with FIONBIO as well
Thanks to almightyhydra for pointing this out! :^)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/ioctl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/ioctl.cpp b/Kernel/Syscalls/ioctl.cpp index acff91dfd1..9b0ba6e8dc 100644 --- a/Kernel/Syscalls/ioctl.cpp +++ b/Kernel/Syscalls/ioctl.cpp @@ -35,8 +35,8 @@ KResultOr<int> Process::sys$ioctl(int fd, unsigned request, FlatPtr arg) auto description = file_description(fd); if (!description) return EBADF; - if (request == FIONBIO && arg != 0) { - description->set_blocking(false); + if (request == FIONBIO) { + description->set_blocking(arg != 0); return KSuccess; } return description->file().ioctl(*description, request, arg); |