Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7400
b: refs/heads/master
c: 5e5d7a2
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Linus Torvalds committed Sep 7, 2005
1 parent 74ed175 commit 0ed9c59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c45817f41af987277353e463c78a1c6beb37da2
refs/heads/master: 5e5d7a22292613e55da8e91d75bcc062fd861f41
13 changes: 7 additions & 6 deletions trunk/fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,17 @@ pipe_poll(struct file *filp, poll_table *wait)

if (filp->f_mode & FMODE_WRITE) {
mask |= (nrbufs < PIPE_BUFFERS) ? POLLOUT | POLLWRNORM : 0;
/*
* Most Unices do not set POLLERR for FIFOs but on Linux they
* behave exactly like pipes for poll().
*/
if (!PIPE_READERS(*inode))
mask |= POLLERR;
}

return mask;
}

/* FIXME: most Unices do not set POLLERR for fifos */
#define fifo_poll pipe_poll

static int
pipe_release(struct inode *inode, int decr, int decw)
{
Expand Down Expand Up @@ -568,7 +569,7 @@ struct file_operations read_fifo_fops = {
.read = pipe_read,
.readv = pipe_readv,
.write = bad_pipe_w,
.poll = fifo_poll,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_read_open,
.release = pipe_read_release,
Expand All @@ -580,7 +581,7 @@ struct file_operations write_fifo_fops = {
.read = bad_pipe_r,
.write = pipe_write,
.writev = pipe_writev,
.poll = fifo_poll,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_write_open,
.release = pipe_write_release,
Expand All @@ -593,7 +594,7 @@ struct file_operations rdwr_fifo_fops = {
.readv = pipe_readv,
.write = pipe_write,
.writev = pipe_writev,
.poll = fifo_poll,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_rdwr_open,
.release = pipe_rdwr_release,
Expand Down

0 comments on commit 0ed9c59

Please sign in to comment.