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

Side by Side Diff: base/process/kill.h

Issue 1320153002: Add new termination status for failed launch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and a nit. Created 5 years, 3 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 | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | 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 // This file contains routines to kill processes and get the exit code and 5 // This file contains routines to kill processes and get the exit code and
6 // termination status. 6 // termination status.
7 7
8 #ifndef BASE_PROCESS_KILL_H_ 8 #ifndef BASE_PROCESS_KILL_H_
9 #define BASE_PROCESS_KILL_H_ 9 #define BASE_PROCESS_KILL_H_
10 10
(...skipping 19 matching lines...) Expand all
30 // Used for the case when oom-killer kills a process on ChromeOS. 30 // Used for the case when oom-killer kills a process on ChromeOS.
31 TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM, 31 TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM,
32 #endif 32 #endif
33 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
34 // On Android processes are spawned from the system Zygote and we do not get 34 // On Android processes are spawned from the system Zygote and we do not get
35 // the termination status. We can't know if the termination was a crash or an 35 // the termination status. We can't know if the termination was a crash or an
36 // oom kill for sure, but we can use status of the strong process bindings as 36 // oom kill for sure, but we can use status of the strong process bindings as
37 // a hint. 37 // a hint.
38 TERMINATION_STATUS_OOM_PROTECTED, // child was protected from oom kill 38 TERMINATION_STATUS_OOM_PROTECTED, // child was protected from oom kill
39 #endif 39 #endif
40 TERMINATION_STATUS_LAUNCH_FAILED, // child process never launched
40 TERMINATION_STATUS_MAX_ENUM 41 TERMINATION_STATUS_MAX_ENUM
41 }; 42 };
42 43
43 // Attempts to kill all the processes on the current machine that were launched 44 // Attempts to kill all the processes on the current machine that were launched
44 // from the given executable name, ending them with the given exit code. If 45 // from the given executable name, ending them with the given exit code. If
45 // filter is non-null, then only processes selected by the filter are killed. 46 // filter is non-null, then only processes selected by the filter are killed.
46 // Returns true if all processes were able to be killed off, false if at least 47 // Returns true if all processes were able to be killed off, false if at least
47 // one couldn't be killed. 48 // one couldn't be killed.
48 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name, 49 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name,
49 int exit_code, 50 int exit_code,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 #if defined(OS_POSIX) && !defined(OS_MACOSX) 126 #if defined(OS_POSIX) && !defined(OS_MACOSX)
126 // The nicer version of EnsureProcessTerminated() that is patient and will 127 // The nicer version of EnsureProcessTerminated() that is patient and will
127 // wait for |pid| to finish and then reap it. 128 // wait for |pid| to finish and then reap it.
128 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid); 129 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid);
129 #endif 130 #endif
130 131
131 } // namespace base 132 } // namespace base
132 133
133 #endif // BASE_PROCESS_KILL_H_ 134 #endif // BASE_PROCESS_KILL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698