summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 03:26:31 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 03:26:31 +0000
commitdc01944a76cd1f09584a56fa365293f4e29ab4f5 (patch)
treeb06a48998a39b2d3c0172e24629dc9322b79a9c2
parentbccc0f374696b8bf075a7113c6f4fe4f1a3504ad (diff)
downloadchromium_src-dc01944a76cd1f09584a56fa365293f4e29ab4f5.zip
chromium_src-dc01944a76cd1f09584a56fa365293f4e29ab4f5.tar.gz
chromium_src-dc01944a76cd1f09584a56fa365293f4e29ab4f5.tar.bz2
Linux: fix getting termination status for known dead processes.
While a process is being destroyed by the kernel, it will loose its IPC file descriptors which signals to the browser that the process is dead. In that timeframe, doing a non blocking waitpid() is racy and can indicate the process as still being running while the kernel is still destroying it. We unify Linux with OS X and use known_dead even in the non Zygote case. BUG=332635 NOTRY=true Review URL: https://codereview.chromium.org/130633002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244069 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/child_process_launcher.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 57a7e25..3a16211 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -469,6 +469,9 @@ base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus(
if (context_->zygote_) {
context_->termination_status_ = ZygoteHostImpl::GetInstance()->
GetTerminationStatus(handle, known_dead, &context_->exit_code_);
+ } else if (known_dead) {
+ context_->termination_status_ =
+ base::GetKnownDeadTerminationStatus(handle, &context_->exit_code_);
} else {
#elif defined(OS_MACOSX)
if (known_dead) {