diff --git a/kernel/src/fs/Pipe.cpp b/kernel/src/fs/Pipe.cpp index d55707de..ff9f8384 100644 --- a/kernel/src/fs/Pipe.cpp +++ b/kernel/src/fs/Pipe.cpp @@ -44,7 +44,11 @@ Result Pipe::read(u8* buf, usize, usize length) Result Pipe::write(const u8* buf, usize, usize length) { - if (!m_reader) return length; + if (!m_reader) + { + Scheduler::current()->send_signal(SIGPIPE); + return err(EPIPE); + } u8* slice = TRY(m_data_buffer.slice_at_end(length)); memcpy(slice, buf, length);