summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index a2d2c39bb5..0bcc5bc5fa 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -1658,6 +1658,8 @@ ssize_t Process::sys$read(int fd, u8* buffer, ssize_t size)
if (!description->can_read()) {
if (current->block<Thread::ReadBlocker>(*description) != Thread::BlockResult::WokeNormally)
return -EINTR;
+ if (!description->can_read())
+ return -EAGAIN;
}
}
return description->read(buffer, size);