Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/sys_pipe.c
Show First 20 Lines • Show All 1,424 Lines • ▼ Show 20 Lines | #endif | ||||
levents = events & | levents = events & | ||||
(POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); | (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); | ||||
if (rpipe->pipe_state & PIPE_NAMED && fp->f_flag & FREAD && levents && | if (rpipe->pipe_state & PIPE_NAMED && fp->f_flag & FREAD && levents && | ||||
fp->f_pipegen == rpipe->pipe_wgen) | fp->f_pipegen == rpipe->pipe_wgen) | ||||
events |= POLLINIGNEOF; | events |= POLLINIGNEOF; | ||||
if ((events & POLLINIGNEOF) == 0) { | if ((events & POLLINIGNEOF) == 0) { | ||||
if (rpipe->pipe_state & PIPE_EOF) { | if (rpipe->pipe_state & PIPE_EOF) { | ||||
if (fp->f_flag & FREAD) | |||||
revents |= (events & (POLLIN | POLLRDNORM)); | revents |= (events & (POLLIN | POLLRDNORM)); | ||||
if (wpipe->pipe_present != PIPE_ACTIVE || | if (wpipe->pipe_present != PIPE_ACTIVE || | ||||
(wpipe->pipe_state & PIPE_EOF)) | (wpipe->pipe_state & PIPE_EOF)) | ||||
revents |= POLLHUP; | revents |= POLLHUP; | ||||
} | } | ||||
} | } | ||||
if (revents == 0) { | if (revents == 0) { | ||||
if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM)) { | if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM)) { | ||||
▲ Show 20 Lines • Show All 345 Lines • Show Last 20 Lines |