summaryrefslogtreecommitdiffstats
path: root/base/process_util_win.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 01:37:23 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 01:37:23 +0000
commit140a7cd1d47292be7c5872c6019c1ab09af774e3 (patch)
tree5210806d7de816fa0025952e20bf6396b1c0d9fb /base/process_util_win.cc
parenta7c2ff748541a96df53995216dc2a7c1209dca48 (diff)
downloadchromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.zip
chromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.tar.gz
chromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.tar.bz2
POSIX: don't spawn zombies.
http://codereview.chromium.org/93147 BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_win.cc')
-rw-r--r--base/process_util_win.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index 13fec9a..fc05664 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -270,8 +270,12 @@ bool KillProcess(ProcessHandle process, int exit_code, bool wait) {
return result;
}
-bool DidProcessCrash(ProcessHandle handle) {
+bool DidProcessCrash(bool* child_exited, ProcessHandle handle) {
DWORD exitcode = 0;
+
+ if (child_exited)
+ *child_exited = true; // On Windows it an error to call this function if
+ // the child hasn't already exited.
if (!::GetExitCodeProcess(handle, &exitcode)) {
NOTREACHED();
return false;