freebsd-skq/sys/fs/fifofs
Konstantin Belousov 7f5dff5064 Fix poll(2) and select(2) for named pipes to return "ready for read"
when all writers, observed by reader, exited. Use writer generation
counter for fifo, and store the snapshot of the fifo generation in the
f_seqcount field of struct file, that is otherwise unused for fifos.
Set FreeBSD-undocumented POLLINIGNEOF flag only when file f_seqcount is
equal to fifo' fi_wgen, and revert r89376.

Fix POLLINIGNEOF for sockets and pipes, and return POLLHUP for them.
Note that the patch does not fix not returning POLLHUP for fifos.

PR:	kern/94772
Submitted by:	bde (original version)
Reviewed by:	rwatson, jilles
Approved by:	re (kensmith)
MFC after:	6 weeks (might be)
2009-07-07 09:43:44 +00:00
..
fifo_vnops.c Fix poll(2) and select(2) for named pipes to return "ready for read" 2009-07-07 09:43:44 +00:00
fifo.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:10:42 +00:00