]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
Fix race in pselect replacement code.
authorDarren Tucker <dtucker@dtucker.net>
Thu, 19 Aug 2021 22:30:42 +0000 (08:30 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 19 Aug 2021 22:30:42 +0000 (08:30 +1000)
commit10e45654cff221ca60fd35ee069df67208fcf415
treeaeebc10bfd44872acf4072e4d418046ccd9a74d1
parent464ba22f1e38d25402e5ec79a9b8d34a32df5a3f
Fix race in pselect replacement code.

On the second and subsequent calls to pselect the notify_pipe was not
added to the select readset, opening up a race that om G. Christensen
discovered on multiprocessor Solaris <=9 systems.

Also reinitialize notify_pipe if the pid changes.  This will prevent a
parent and child from using the same FD, although this is not an issue
in the current structure it might be in future.
openbsd-compat/bsd-pselect.c