HomeFreeBSD

Fix poll() on half-closed sockets, while retaining POLLHUP for fifos.

Description

Fix poll() on half-closed sockets, while retaining POLLHUP for fifos.

This reverts part of r196460, so that sockets only return POLLHUP if both
directions are closed/error. Fifos get POLLHUP by closing the unused
direction immediately after creating the sockets.

The tools/regression/poll/*poll.c tests now pass except for two other things:

  • if POLLHUP is returned, POLLIN is always returned as well instead of only when there is data left in the buffer to be read
  • fifo old/new reader distinction does not work the way POSIX specs it

Reviewed by: kib, bde

Details

Provenance
jillesAuthored on Aug 25 2009, 9:44 PM
Parents
rG986dffaf53ff: - Use the headers from ACPI-CA to define various constants and structures
Branches
Unknown
Tags
Unknown

Event Timeline