Index: head/sys/kern/sys_pipe.c =================================================================== --- head/sys/kern/sys_pipe.c +++ head/sys/kern/sys_pipe.c @@ -1430,7 +1430,8 @@ if ((events & POLLINIGNEOF) == 0) { if (rpipe->pipe_state & PIPE_EOF) { - revents |= (events & (POLLIN | POLLRDNORM)); + if (fp->f_flag & FREAD) + revents |= (events & (POLLIN | POLLRDNORM)); if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) revents |= POLLHUP;