From 18b26ff595b617d282ed12baf49c5682270b35d1 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 23 Jul 2020 14:10:13 +0200 Subject: [PATCH] vfs/pipe: never report read_ready on pipe/out handle --- repos/gems/src/lib/vfs/pipe/plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }