Increment fi_wgen before awakening threads polling the read socket of a
FIFO. Previously, a thread sleeping in poll() could be awakened and
re-poll the FIFO with the old value of fi_wgen (and thus improperly
setting POLLINIGNEOF) before a thread closing a writable fifo descriptor
bumped fi_wgen. The end result was that the reading thread in poll()
would never see POLLHUP but could block forever (or until a timeout).
This is a direct commit to 8 and 9 since the FIFO code is implemented
differently in 10.x and later. The pipe-backed FIFOs in 10 do not have
this bug.
git-svn-id: svn://svn.freebsd.org/base/stable/8@263309
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f