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

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

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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
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 27 matching lines...) Expand all
38 38
39 // Attempts to kill all the processes on the current machine that were launched 39 // Attempts to kill all the processes on the current machine that were launched
40 // from the given executable name, ending them with the given exit code. If 40 // from the given executable name, ending them with the given exit code. If
41 // filter is non-null, then only processes selected by the filter are killed. 41 // filter is non-null, then only processes selected by the filter are killed.
42 // Returns true if all processes were able to be killed off, false if at least 42 // Returns true if all processes were able to be killed off, false if at least
43 // one couldn't be killed. 43 // one couldn't be killed.
44 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name, 44 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name,
45 int exit_code, 45 int exit_code,
46 const ProcessFilter* filter); 46 const ProcessFilter* filter);
47 47
48 // Attempts to kill the process identified by the given process
49 // entry structure, giving it the specified exit code. If |wait| is true, wait
50 // for the process to be actually terminated before returning.
51 // Returns true if this is successful, false otherwise.
52 BASE_EXPORT bool KillProcess(ProcessHandle process, int exit_code, bool wait);
53
54 #if defined(OS_POSIX) 48 #if defined(OS_POSIX)
55 // Attempts to kill the process group identified by |process_group_id|. Returns 49 // Attempts to kill the process group identified by |process_group_id|. Returns
56 // true on success. 50 // true on success.
57 BASE_EXPORT bool KillProcessGroup(ProcessHandle process_group_id); 51 BASE_EXPORT bool KillProcessGroup(ProcessHandle process_group_id);
58 #endif // defined(OS_POSIX) 52 #endif // defined(OS_POSIX)
59 53
60 // Get the termination status of the process by interpreting the 54 // Get the termination status of the process by interpreting the
61 // circumstances of the child process' death. |exit_code| is set to 55 // circumstances of the child process' death. |exit_code| is set to
62 // the status returned by waitpid() on POSIX, and from 56 // the status returned by waitpid() on POSIX, and from
63 // GetExitCodeProcess() on Windows. |exit_code| may be NULL if the 57 // GetExitCodeProcess() on Windows. |exit_code| may be NULL if the
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 120
127 #if defined(OS_POSIX) && !defined(OS_MACOSX) 121 #if defined(OS_POSIX) && !defined(OS_MACOSX)
128 // The nicer version of EnsureProcessTerminated() that is patient and will 122 // The nicer version of EnsureProcessTerminated() that is patient and will
129 // wait for |pid| to finish and then reap it. 123 // wait for |pid| to finish and then reap it.
130 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid); 124 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid);
131 #endif 125 #endif
132 126
133 } // namespace base 127 } // namespace base
134 128
135 #endif // BASE_PROCESS_KILL_H_ 129 #endif // BASE_PROCESS_KILL_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_value_map.cc ('k') | base/process/kill.cc » ('j') | mojo/public/tools/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698