Commit dc01944a authored by jln@chromium.org's avatar jln@chromium.org

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
parent bccc0f37
...@@ -469,6 +469,9 @@ base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus( ...@@ -469,6 +469,9 @@ base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus(
if (context_->zygote_) { if (context_->zygote_) {
context_->termination_status_ = ZygoteHostImpl::GetInstance()-> context_->termination_status_ = ZygoteHostImpl::GetInstance()->
GetTerminationStatus(handle, known_dead, &context_->exit_code_); GetTerminationStatus(handle, known_dead, &context_->exit_code_);
} else if (known_dead) {
context_->termination_status_ =
base::GetKnownDeadTerminationStatus(handle, &context_->exit_code_);
} else { } else {
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
if (known_dead) { if (known_dead) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment