Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143740492
D27094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
763 B
Referenced Files
None
Subscribers
None
D27094.diff
View Options
Index: head/sys/kern/sys_pipe.c
===================================================================
--- head/sys/kern/sys_pipe.c
+++ head/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) != 0) {
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)!= 0) {
selrecord(td, &wpipe->pipe_sel);
if (SEL_WAITING(&wpipe->pipe_sel))
wpipe->pipe_state |= PIPE_SEL;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 10:16 AM (13 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28340735
Default Alt Text
D27094.diff (763 B)
Attached To
Mode
D27094: pipe: fix POLLHUP handling if no events were specified
Attached
Detach File
Event Timeline
Log In to Comment