diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index ffa0b282a5..0592e3b065 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -247,13 +247,13 @@ Vfs_pipe::Pipe_handle::read(char *buf, bool Vfs_pipe::Pipe_handle::read_ready() { - return !pipe.buffer.empty(); } + return !writer && !pipe.buffer.empty(); } bool Vfs_pipe::Pipe_handle::notify_read_ready() { - if (!read_ready_elem.enqueued()) + if (!writer && !read_ready_elem.enqueued()) pipe.read_ready_waiters.enqueue(read_ready_elem); return true; }