summaryrefslogtreecommitdiffstats
path: root/base/process_util_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r--base/process_util_posix.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 87abbb8..562b8e9 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -140,24 +140,13 @@ void RaiseProcessToHighPriority() {
// setpriority() or sched_getscheduler, but these all require extra rights.
}
-bool DidProcessCrash(bool* child_exited, ProcessHandle handle) {
+bool DidProcessCrash(ProcessHandle handle) {
int status;
- const int result = waitpid(handle, &status, WNOHANG);
- if (result == -1) {
- LOG(ERROR) << "waitpid failed with errno:" << errno;
- if (child_exited)
- *child_exited = false;
- return false;
- } else if (result == 0) {
- // the child hasn't exited yet.
- if (child_exited)
- *child_exited = false;
+ if (waitpid(handle, &status, WNOHANG)) {
+ // I feel like dancing!
return false;
}
- if (child_exited)
- *child_exited = true;
-
if (WIFSIGNALED(status)) {
switch(WTERMSIG(status)) {
case SIGSEGV: