Skip to content

Commit

Permalink
vfs_lxip: propagate data file write error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ssumpf authored and chelmuth committed Mar 28, 2024
1 parent b43ef6b commit 840da5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion repos/dde_linux/src/lib/vfs/lxip/vfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 &,
Expand Down

0 comments on commit 840da5d

Please sign in to comment.