vfs_lxip: propagate data file write error

All errors (as in the legacy version) are now propagated as WRITE_ERR_IO
(see Lxip_vfs_file_handle::write), which ultimately will lead to EPIPE
in libc's socket_fs. This also counts for EAGAIN leading to the fact
that partial writes are not supported for blocking sockets in libc, also
libc will not try a second time in case not all data has been written.

issue #5165
This commit is contained in:
Sebastian Sumpf 2024-03-27 15:42:53 +01:00 committed by Christian Helmuth
parent b30bacf86e
commit 1056c759fd

View File

@ -475,7 +475,12 @@ class Vfs::Lxip_data_file final : public Vfs::Lxip_file
_write_err = genode_socket_sendmsg(&_sock, msg_send.header(), &bytes_sent);
return bytes_sent;
/* TODO: propagate EAGAIN
if (_write_err == GENODE_EAGAIN)
throw Would_block();
*/
return _write_err == GENODE_ENONE ? bytes_sent : -1;
}
long read(Lxip_vfs_file_handle &,