diff options
author | sobomax <sobomax@FreeBSD.org> | 2001-11-19 09:25:30 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2001-11-19 09:25:30 +0000 |
commit | 23105d497903bd0954296e80567bd44d8b3c6100 (patch) | |
tree | 75535786680d215cf0bff895e8c19a89f8acf3a5 /sys/kern/sys_pipe.c | |
parent | 31d89aa48d91c0c83f48a8abf75228f53582a531 (diff) | |
download | FreeBSD-src-23105d497903bd0954296e80567bd44d8b3c6100.zip FreeBSD-src-23105d497903bd0954296e80567bd44d8b3c6100.tar.gz |
Make kevents on pipes work as described in the manpage - when the last
reader/writer disconnects, ensure that anybody who is waiting for the
kevent on the other end of the pipe gets EV_EOF.
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index d873f87..fd16065 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1221,6 +1221,7 @@ pipeclose(cpipe) ppipe->pipe_state |= PIPE_EOF; wakeup(ppipe); + KNOTE(&ppipe->pipe_sel.si_note, 0); ppipe->pipe_peer = NULL; } /* |