mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 21:45:29 +00:00
Share the "blocked-on file descriptor" number between read() and write().
A process can't be reading and writing at the same time, so it's fine for them to share the variable for the blocked FD.
This commit is contained in:
@@ -1055,7 +1055,7 @@ ssize_t Process::sys$read(int fd, void* outbuf, size_t nread)
|
||||
return -EBADF;
|
||||
if (descriptor->is_blocking()) {
|
||||
if (!descriptor->has_data_available_for_reading()) {
|
||||
m_fdBlockedOnRead = fd;
|
||||
m_blocked_fd = fd;
|
||||
block(BlockedRead);
|
||||
sched_yield();
|
||||
if (m_was_interrupted_while_blocked)
|
||||
|
||||
Reference in New Issue
Block a user