| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 functions for launching subprocesses. | 5 // This file contains functions for launching subprocesses. |
| 6 | 6 |
| 7 #ifndef BASE_PROCESS_LAUNCH_H_ | 7 #ifndef BASE_PROCESS_LAUNCH_H_ |
| 8 #define BASE_PROCESS_LAUNCH_H_ | 8 #define BASE_PROCESS_LAUNCH_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 #if defined(OS_LINUX) | 134 #if defined(OS_LINUX) |
| 135 // If non-zero, start the process using clone(), using flags as provided. | 135 // If non-zero, start the process using clone(), using flags as provided. |
| 136 // Unlike in clone, clone_flags may not contain a custom termination signal | 136 // Unlike in clone, clone_flags may not contain a custom termination signal |
| 137 // that is sent to the parent when the child dies. The termination signal will | 137 // that is sent to the parent when the child dies. The termination signal will |
| 138 // always be set to SIGCHLD. | 138 // always be set to SIGCHLD. |
| 139 int clone_flags; | 139 int clone_flags; |
| 140 | 140 |
| 141 // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If | 141 // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If |
| 142 // true, then this bit will not be set in the new child process. | 142 // true, then this bit will not be set in the new child process. |
| 143 bool allow_new_privs; | 143 bool allow_new_privs; |
| 144 |
| 145 // Sets parent process death signal to SIGKILL. |
| 146 bool kill_on_parent_death; |
| 144 #endif // defined(OS_LINUX) | 147 #endif // defined(OS_LINUX) |
| 145 | 148 |
| 146 #if defined(OS_POSIX) | 149 #if defined(OS_POSIX) |
| 147 // If not empty, change to this directory before execing the new process. | 150 // If not empty, change to this directory before execing the new process. |
| 148 base::FilePath current_directory; | 151 base::FilePath current_directory; |
| 149 | 152 |
| 150 // If non-null, a delegate to be run immediately prior to executing the new | 153 // If non-null, a delegate to be run immediately prior to executing the new |
| 151 // program in the child process. | 154 // program in the child process. |
| 152 // | 155 // |
| 153 // WARNING: If LaunchProcess is called in the presence of multiple threads, | 156 // WARNING: If LaunchProcess is called in the presence of multiple threads, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // multiple threads are running, since at the time the fork happened, the | 312 // multiple threads are running, since at the time the fork happened, the |
| 310 // threads could have been in any state (potentially holding locks, etc.). | 313 // threads could have been in any state (potentially holding locks, etc.). |
| 311 // Callers should most likely call execve() in the child soon after calling | 314 // Callers should most likely call execve() in the child soon after calling |
| 312 // this. | 315 // this. |
| 313 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid); | 316 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid); |
| 314 #endif | 317 #endif |
| 315 | 318 |
| 316 } // namespace base | 319 } // namespace base |
| 317 | 320 |
| 318 #endif // BASE_PROCESS_LAUNCH_H_ | 321 #endif // BASE_PROCESS_LAUNCH_H_ |
| OLD | NEW |