vfs_lxip: return error in case peek read returns EAGAIN

A read with MSG_PEEK returns -1 and EGAIN/EWOULDBLOCK in case the socket
is connected. Zero is only returned if the socket is disconnected.

isuee #5104
This commit is contained in:
Sebastian Sumpf 2024-02-16 10:04:09 +01:00 committed by Christian Helmuth
parent 7cbce1f47c
commit ff1e4b1bfb

View File

@ -527,7 +527,7 @@ class Vfs::Lxip_peek_file final : public Vfs::Lxip_file
Errno err = genode_socket_recvmsg(&_sock, msg_recv.header(), &bytes_avail, true);
if (err == GENODE_EAGAIN)
return 0;
return -1;
return bytes_avail;
}