|
@@ -1128,6 +1128,8 @@ ssize_t Process::sys$read(int fd, u8* buffer, ssize_t size)
|
|
auto* description = file_description(fd);
|
|
auto* description = file_description(fd);
|
|
if (!description)
|
|
if (!description)
|
|
return -EBADF;
|
|
return -EBADF;
|
|
|
|
+ if (description->is_directory())
|
|
|
|
+ return -EISDIR;
|
|
if (description->is_blocking()) {
|
|
if (description->is_blocking()) {
|
|
if (!description->can_read()) {
|
|
if (!description->can_read()) {
|
|
if (current->block<Thread::ReadBlocker>(*description) == Thread::BlockResult::InterruptedBySignal)
|
|
if (current->block<Thread::ReadBlocker>(*description) == Thread::BlockResult::InterruptedBySignal)
|