summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2000-09-14 20:10:19 +0000
committerjlemon <jlemon@FreeBSD.org>2000-09-14 20:10:19 +0000
commit094011d95c4db982956963b5bd9133d7ad4c6b32 (patch)
treef307cb61e6c3b0011c7577d35e485d02b2ab5b89 /sys/kern/sys_pipe.c
parent14cd23b120034b53d9cbec473fbf1273f3fbd2c2 (diff)
downloadFreeBSD-src-094011d95c4db982956963b5bd9133d7ad4c6b32.zip
FreeBSD-src-094011d95c4db982956963b5bd9133d7ad4c6b32.tar.gz
Pipes are not writeable while a direct write is in progress. However,
the kqueue filter got the sense of the test reversed, so fix it. Spotted by: Michael Elkins <me@sigpipe.org>
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 40d47e4..7600ffd 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1222,7 +1222,7 @@ filt_pipewrite(struct knote *kn, long hint)
return (1);
}
kn->kn_data = wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt;
- if ((wpipe->pipe_state & PIPE_DIRECTW) == 0)
+ if (wpipe->pipe_state & PIPE_DIRECTW)
kn->kn_data = 0;
return (kn->kn_data >= PIPE_BUF);
OpenPOWER on IntegriCloud