mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy
Instead of temporary changing the open file description's "blocking" flag while doing a non-waiting recvfrom, we instead plumb the currently wanted blocking behavior all the way through to the underlying socket.
This commit is contained in:
@@ -242,7 +242,7 @@ ErrorOr<size_t> Socket::read(OpenFileDescription& description, u64, UserOrKernel
|
||||
if (is_shut_down_for_reading())
|
||||
return 0;
|
||||
Time t {};
|
||||
return recvfrom(description, buffer, size, 0, {}, 0, t);
|
||||
return recvfrom(description, buffer, size, 0, {}, 0, t, description.is_blocking());
|
||||
}
|
||||
|
||||
ErrorOr<size_t> Socket::write(OpenFileDescription& description, u64, UserOrKernelBuffer const& data, size_t size)
|
||||
|
||||
Reference in New Issue
Block a user