Chromium Code Reviews| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 LaunchOptions(); | 61 LaunchOptions(); |
| 62 LaunchOptions(const LaunchOptions&); | 62 LaunchOptions(const LaunchOptions&); |
| 63 ~LaunchOptions(); | 63 ~LaunchOptions(); |
| 64 | 64 |
| 65 // If true, wait for the process to complete. | 65 // If true, wait for the process to complete. |
| 66 bool wait = false; | 66 bool wait = false; |
| 67 | 67 |
| 68 // If not empty, change to this directory before executing the new process. | 68 // If not empty, change to this directory before executing the new process. |
| 69 base::FilePath current_directory; | 69 base::FilePath current_directory; |
| 70 | 70 |
| 71 // If not empty, launch the specified executable instead of | |
|
Nico
2016/09/22 17:03:03
Does this ever make sense on non-posix? Do you kno
| |
| 72 // cmdline.GetProgram(). This is useful when it is necessary to pass a custom | |
| 73 // argv[0]. | |
| 74 base::FilePath real_path; | |
| 75 | |
| 71 #if defined(OS_WIN) | 76 #if defined(OS_WIN) |
| 72 bool start_hidden = false; | 77 bool start_hidden = false; |
| 73 | 78 |
| 74 // If non-null, inherit exactly the list of handles in this vector (these | 79 // If non-null, inherit exactly the list of handles in this vector (these |
| 75 // handles must be inheritable). | 80 // handles must be inheritable). |
| 76 HandlesToInheritVector* handles_to_inherit = nullptr; | 81 HandlesToInheritVector* handles_to_inherit = nullptr; |
| 77 | 82 |
| 78 // If true, the new process inherits handles from the parent. In production | 83 // If true, the new process inherits handles from the parent. In production |
| 79 // code this flag should be used only when running short-lived, trusted | 84 // code this flag should be used only when running short-lived, trusted |
| 80 // binaries, because open handles from other libraries and subsystems will | 85 // binaries, because open handles from other libraries and subsystems will |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 299 // multiple threads are running, since at the time the fork happened, the | 304 // multiple threads are running, since at the time the fork happened, the |
| 300 // threads could have been in any state (potentially holding locks, etc.). | 305 // threads could have been in any state (potentially holding locks, etc.). |
| 301 // Callers should most likely call execve() in the child soon after calling | 306 // Callers should most likely call execve() in the child soon after calling |
| 302 // this. | 307 // this. |
| 303 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid); | 308 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid); |
| 304 #endif | 309 #endif |
| 305 | 310 |
| 306 } // namespace base | 311 } // namespace base |
| 307 | 312 |
| 308 #endif // BASE_PROCESS_LAUNCH_H_ | 313 #endif // BASE_PROCESS_LAUNCH_H_ |
| OLD | NEW |