diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-22 23:27:11 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-22 23:27:11 +0000 |
commit | 6d780fd50a98e2f2bd5da87e2d18d6dc46f3d98a (patch) | |
tree | 9be163c90f80b2fd153bf1acde5244b898569928 /third_party/libevent/evbuffer.c | |
parent | bf362112780f684895110470f3fd3cc9b5eaf376 (diff) | |
download | chromium_src-6d780fd50a98e2f2bd5da87e2d18d6dc46f3d98a.zip chromium_src-6d780fd50a98e2f2bd5da87e2d18d6dc46f3d98a.tar.gz chromium_src-6d780fd50a98e2f2bd5da87e2d18d6dc46f3d98a.tar.bz2 |
Fix WaitForSingleNonChildProcess. There were three bugs in the loop usage.
There was a bug in the original code in that if the loop executes a second
time, kq will have been closed.
The existing code was not careful about resetting the timeout in the event
that the kevent had to be restarted in the loop.
The existing code would continue adding the same "change" to the kqueue on
each iteration of the loop.
The replacement code has been taken mostly from
content/common/process_watcher_mac.cc WaitForChildToDie. I would actually like
to align these two functions to use the same backend implementation, but that
will require better signalling from the backend about which specific case is
causing it to return, because WaitForChildToDie needs to be able to reap or
kill-and-reap the process while avoiding the "zombie kernel death race"
explained in that function's comments. Since WaitForSingleNonChildProcess is
currently only concerned with non-child processes, it doesn't need to worry
about any of this reaping business.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7708006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libevent/evbuffer.c')
0 files changed, 0 insertions, 0 deletions