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>
This commit is contained in:
parent
07ef427609
commit
6f451c99b3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user