Page MenuHomeFreeBSD

D27094.id79188.diff
No OneTemporary

D27094.id79188.diff

Index: sys/kern/sys_pipe.c
===================================================================
--- sys/kern/sys_pipe.c
+++ sys/kern/sys_pipe.c
@@ -1458,13 +1458,17 @@
}
if (revents == 0) {
- if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM)) {
+ /*
+ * Add ourselves regardless of eventmask as we have to return
+ * POLLHUP even if it was not asked for.
+ */
+ if (fp->f_flag & FREAD) {
selrecord(td, &rpipe->pipe_sel);
if (SEL_WAITING(&rpipe->pipe_sel))
rpipe->pipe_state |= PIPE_SEL;
}
- if (fp->f_flag & FWRITE && events & (POLLOUT | POLLWRNORM)) {
+ if (fp->f_flag & FWRITE) {
selrecord(td, &wpipe->pipe_sel);
if (SEL_WAITING(&wpipe->pipe_sel))
wpipe->pipe_state |= PIPE_SEL;

File Metadata

Mime Type
text/plain
Expires
Sun, Sep 6, 8:12 PM (3 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38430191
Default Alt Text
D27094.id79188.diff (735 B)

Event Timeline