Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Side by Side Diff: base/process/kill_posix.cc

Issue 2188293002: Correctly detect renderer crash because of CHECK failures on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SIGSYS Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process/kill.h" 5 #include "base/process/kill.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <sys/wait.h> 10 #include <sys/wait.h>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (exit_code) 45 if (exit_code)
46 *exit_code = status; 46 *exit_code = status;
47 47
48 if (WIFSIGNALED(status)) { 48 if (WIFSIGNALED(status)) {
49 switch (WTERMSIG(status)) { 49 switch (WTERMSIG(status)) {
50 case SIGABRT: 50 case SIGABRT:
51 case SIGBUS: 51 case SIGBUS:
52 case SIGFPE: 52 case SIGFPE:
53 case SIGILL: 53 case SIGILL:
54 case SIGSEGV: 54 case SIGSEGV:
55 case SIGTRAP:
56 case SIGSYS:
55 return TERMINATION_STATUS_PROCESS_CRASHED; 57 return TERMINATION_STATUS_PROCESS_CRASHED;
56 case SIGKILL: 58 case SIGKILL:
57 #if defined(OS_CHROMEOS) 59 #if defined(OS_CHROMEOS)
58 // On ChromeOS, only way a process gets kill by SIGKILL 60 // On ChromeOS, only way a process gets kill by SIGKILL
59 // is by oom-killer. 61 // is by oom-killer.
60 return TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM; 62 return TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM;
61 #endif 63 #endif
62 case SIGINT: 64 case SIGINT:
63 case SIGTERM: 65 case SIGTERM:
64 return TERMINATION_STATUS_PROCESS_WAS_KILLED; 66 return TERMINATION_STATUS_PROCESS_WAS_KILLED;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return; 225 return;
224 226
225 BackgroundReaper* reaper = new BackgroundReaper(pid, 0); 227 BackgroundReaper* reaper = new BackgroundReaper(pid, 0);
226 PlatformThread::CreateNonJoinable(0, reaper); 228 PlatformThread::CreateNonJoinable(0, reaper);
227 } 229 }
228 230
229 #endif // !defined(OS_MACOSX) 231 #endif // !defined(OS_MACOSX)
230 #endif // !defined(OS_NACL_NONSFI) 232 #endif // !defined(OS_NACL_NONSFI)
231 233
232 } // namespace base 234 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698