plan9fox/sys
cinap_lenrek 631aef280d ape: fix thread race with close() and select()
in ape close(), do the real filedescriptor _CLOSE() *after* we cleared
the _fdinfo[] slot because once closed, we dont own the slot anymore and
another process doing open() can trash the slot. make sure open() retuns
fd < OPEN_MAX.

double check in _startbuf() holding mux->lock if the fd is already buffered
preveting running double copyprocs on a fd.

dont zero the mux->rwant/ewant bitmaps at the end of select() as we do not
hold the mix->lock.

in _closebuf() kill copyproc while holding the mux->lock to make sure the
copyproc isnt holding it at the time it is killed. run kill() multiple times
to make sure the proc is gone.
2013-03-11 01:16:34 +01:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: He wasn't asking about plan9port. 2013-03-07 18:34:35 -05:00
include ape: add PASS_MAX constant for getpass() to limits.h (from patch/ape-pass_max) 2013-02-28 19:21:03 +01:00
lib dont use full qualified domain names in example configuration 2013-02-27 08:18:18 +01:00
man provide wpa(8) manual page 2013-03-09 19:18:00 +01:00
src ape: fix thread race with close() and select() 2013-03-11 01:16:34 +01:00