mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
vfs/pipe: trigger I/O-progress handler on EOF
When the last writer closes the pipe, we must trigger the I/O progress handler to deliver the final EOF to the client (READ_OK with out count of 0). Fixes #3697
This commit is contained in:
parent
e3bc77c386
commit
4fe4c9aa63
@ -400,8 +400,13 @@ class Vfs_pipe::File_system : public Vfs::File_system
|
||||
Pipe *pipe = nullptr;
|
||||
if (Pipe_handle *handle = dynamic_cast<Pipe_handle*>(vfs_handle)) {
|
||||
pipe = &handle->pipe;
|
||||
if (handle->writer)
|
||||
if (handle->writer) {
|
||||
pipe->num_writers--;
|
||||
|
||||
/* trigger reattempt of read to deliver EOF */
|
||||
if (pipe->num_writers == 0)
|
||||
pipe->submit_signal();
|
||||
}
|
||||
} else
|
||||
if (New_pipe_handle *handle = dynamic_cast<New_pipe_handle*>(vfs_handle))
|
||||
pipe = &handle->pipe;
|
||||
|
Loading…
x
Reference in New Issue
Block a user