Kernel: Let's allow unsetting non-blocking mode with FIONBIO as well

Thanks to almightyhydra for pointing this out! :^)
This commit is contained in:
Andreas Kling 2021-03-29 08:57:11 +02:00
parent d454926e0f
commit 0f270afda8
Notes: sideshowbarker 2024-07-18 20:59:21 +09:00

View file

@ -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);