diff options
author | dzwdz | 2023-08-27 02:06:32 +0200 |
---|---|---|
committer | dzwdz | 2023-08-27 02:06:32 +0200 |
commit | e43939bcc6123e02314aa403eef94d5ace441f7f (patch) | |
tree | ac0cea10e8708ae1a6a7a400257c4bc59175a91f /src/kernel/pipe.c | |
parent | 1f938c20b4a82ca1267ab9a1ec0922878a21ca6b (diff) |
ports: qbe, cproc :^)
Diffstat (limited to 'src/kernel/pipe.c')
-rw-r--r-- | src/kernel/pipe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/pipe.c b/src/kernel/pipe.c index 6325369..b7f5ad3 100644 --- a/src/kernel/pipe.c +++ b/src/kernel/pipe.c @@ -1,3 +1,4 @@ +#include <camellia/errno.h> #include <kernel/panic.h> #include <kernel/pipe.h> #include <kernel/util.h> @@ -8,7 +9,7 @@ void pipe_joinqueue(Handle *h, Proc *proc, void __user *pbuf, size_t pbuflen) { assert(h && h->type == HANDLE_PIPE); assert(h->readable ^ h->writeable); if (!h->pipe.sister) { - regs_savereturn(&proc->regs, -1); + regs_savereturn(&proc->regs, h->readable ? 0 : -EPIPE); return; } |