base: Fix a potential race in PollQueue::setupAsyncIO
authorAndreas Sandberg <andreas@sandberg.pp.se>
Mon, 7 Oct 2013 14:03:15 +0000 (16:03 +0200)
committerAndreas Sandberg <andreas@sandberg.pp.se>
Mon, 7 Oct 2013 14:03:15 +0000 (16:03 +0200)
commitc0f367e51454dc9d2610bbd3266a80cec7b4ad69
tree2eb387b9703f9d79d8d4291dd8516f19fa29a07a
parent0dd6f87e63edcafdb2df9b582d768bfca9e78d6a
base: Fix a potential race in PollQueue::setupAsyncIO

There is a potential race between enabling asynchronous IO and
selecting the target for the SIGIO signal. This changeset move the
F_SETOWN call to before the F_SETFL call that enables SIGIO
delivery. This ensures that signals are always sent to the correct
process.
src/base/pollevent.cc