diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 11:55:08 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 11:55:08 +0000 |
commit | e36e86f9cf568e12a47cc779893580a09b08803a (patch) | |
tree | babbda83fb63c64565309a8fd19782f1145c72ce /chrome/common/process_watcher.h | |
parent | 86e19d84402a76c57fce85655c24f547312b6084 (diff) | |
download | chromium_src-e36e86f9cf568e12a47cc779893580a09b08803a.zip chromium_src-e36e86f9cf568e12a47cc779893580a09b08803a.tar.gz chromium_src-e36e86f9cf568e12a47cc779893580a09b08803a.tar.bz2 |
Make ProcessWatcher use kqueues on Mac.
* Port ProcessWatcher::EnsureProcessTerminated() to kqueue() APIs on OS X.
* Make ProcessWatcher::EnsureProcessGetsReaped() Linux-only, since it's only used there.
* Add a unit test.
BUG=12731
TEST=Open Chrome/Mac, open and close a few tabs. Processes shouldn't stay around.
Review URL: http://codereview.chromium.org/496007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34547 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/process_watcher.h')
-rw-r--r-- | chrome/common/process_watcher.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/common/process_watcher.h b/chrome/common/process_watcher.h index a1f909c..54b344b 100644 --- a/chrome/common/process_watcher.h +++ b/chrome/common/process_watcher.h @@ -20,14 +20,15 @@ class ProcessWatcher { // does not appear to have exited, then this function starts to become // aggressive about ensuring that the process terminates. // - // This method does not block the calling thread. + // On Linux this method does not block the calling thread. + // On OS X this method may block for up to 2 seconds. // // NOTE: The process handle must have been opened with the PROCESS_TERMINATE // and SYNCHRONIZE permissions. // static void EnsureProcessTerminated(base::ProcessHandle process_handle); -#if defined(OS_POSIX) +#if defined(OS_LINUX) // The nicer version of EnsureProcessTerminated() that is patient and will // wait for |process_handle| to finish and then reap it. static void EnsureProcessGetsReaped(base::ProcessHandle process_handle); |