| OLD | NEW |
| 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 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
| 13 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 | 18 |
| 19 class ProcessFilter; | 19 class ProcessFilter; |
| 20 | 20 |
| 21 #if defined(OS_WIN) |
| 22 namespace win { |
| 23 |
| 24 // See definition in sandbox/win/src/sandbox_types.h |
| 25 const DWORD kSandboxFatalMemoryExceeded = 7012; |
| 26 |
| 27 } // namespace win |
| 28 |
| 29 #endif // OS_WIN |
| 30 |
| 21 // Return status values from GetTerminationStatus. Don't use these as | 31 // Return status values from GetTerminationStatus. Don't use these as |
| 22 // exit code arguments to KillProcess*(), use platform/application | 32 // exit code arguments to KillProcess*(), use platform/application |
| 23 // specific values instead. | 33 // specific values instead. |
| 24 enum TerminationStatus { | 34 enum TerminationStatus { |
| 25 TERMINATION_STATUS_NORMAL_TERMINATION, // zero exit status | 35 TERMINATION_STATUS_NORMAL_TERMINATION, // zero exit status |
| 26 TERMINATION_STATUS_ABNORMAL_TERMINATION, // non-zero exit status | 36 TERMINATION_STATUS_ABNORMAL_TERMINATION, // non-zero exit status |
| 27 TERMINATION_STATUS_PROCESS_WAS_KILLED, // e.g. SIGKILL or task manager kill | 37 TERMINATION_STATUS_PROCESS_WAS_KILLED, // e.g. SIGKILL or task manager kill |
| 28 TERMINATION_STATUS_PROCESS_CRASHED, // e.g. Segmentation fault | 38 TERMINATION_STATUS_PROCESS_CRASHED, // e.g. Segmentation fault |
| 29 TERMINATION_STATUS_STILL_RUNNING, // child hasn't exited yet | 39 TERMINATION_STATUS_STILL_RUNNING, // child hasn't exited yet |
| 30 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 137 |
| 128 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 138 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 129 // The nicer version of EnsureProcessTerminated() that is patient and will | 139 // The nicer version of EnsureProcessTerminated() that is patient and will |
| 130 // wait for |pid| to finish and then reap it. | 140 // wait for |pid| to finish and then reap it. |
| 131 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid); | 141 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid); |
| 132 #endif | 142 #endif |
| 133 | 143 |
| 134 } // namespace base | 144 } // namespace base |
| 135 | 145 |
| 136 #endif // BASE_PROCESS_KILL_H_ | 146 #endif // BASE_PROCESS_KILL_H_ |
| OLD | NEW |