From 2d5058685df4ef2245e246f1d6ee124ad540272d Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 28 Mar 2006 11:28:16 +0000 Subject: [PATCH] Don't open pipes readwrite as it leads to confusion. --- servers/fs/open.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/servers/fs/open.c b/servers/fs/open.c index 31f6eaf30..a4f2cdbc4 100644 --- a/servers/fs/open.c +++ b/servers/fs/open.c @@ -287,6 +287,12 @@ PRIVATE int pipe_open(register struct inode *rip, register mode_t bits, */ rip->i_pipe = I_PIPE; + + if((bits & (R_BIT|W_BIT)) == (R_BIT|W_BIT)) { + printf("pipe opened RW.\n"); + return ENXIO; + } + if (find_filp(rip, bits & W_BIT ? R_BIT : W_BIT) == NIL_FILP) { if (oflags & O_NONBLOCK) { if (bits & W_BIT) return(ENXIO); -- 2.44.0