| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // |inherit_handles| flag must be set to true when redirecting stdio stream. | 81 // |inherit_handles| flag must be set to true when redirecting stdio stream. |
| 82 HANDLE stdin_handle; | 82 HANDLE stdin_handle; |
| 83 HANDLE stdout_handle; | 83 HANDLE stdout_handle; |
| 84 HANDLE stderr_handle; | 84 HANDLE stderr_handle; |
| 85 | 85 |
| 86 // If set to true, ensures that the child process is launched with the | 86 // If set to true, ensures that the child process is launched with the |
| 87 // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent | 87 // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent |
| 88 // job if any. | 88 // job if any. |
| 89 bool force_breakaway_from_job_; | 89 bool force_breakaway_from_job_; |
| 90 #else | 90 #else |
| 91 // Set/unset environment variables. Empty (the default) means to inherit | 91 // Set/unset environment variables. These are applied on top of the parent |
| 92 // the same environment. See AlterEnvironment(). | 92 // process environment. Empty (the default) means to inherit the same |
| 93 // environment. See AlterEnvironment(). |
| 93 EnvironmentMap environ; | 94 EnvironmentMap environ; |
| 94 | 95 |
| 96 // Clear the environment for the new process before processing changes from |
| 97 // |environ|. |
| 98 bool clear_environ; |
| 99 |
| 95 // If non-null, remap file descriptors according to the mapping of | 100 // If non-null, remap file descriptors according to the mapping of |
| 96 // src fd->dest fd to propagate FDs into the child process. | 101 // src fd->dest fd to propagate FDs into the child process. |
| 97 // This pointer is owned by the caller and must live through the | 102 // This pointer is owned by the caller and must live through the |
| 98 // call to LaunchProcess(). | 103 // call to LaunchProcess(). |
| 99 const FileHandleMappingVector* fds_to_remap; | 104 const FileHandleMappingVector* fds_to_remap; |
| 100 | 105 |
| 101 // Each element is an RLIMIT_* constant that should be raised to its | 106 // Each element is an RLIMIT_* constant that should be raised to its |
| 102 // rlim_max. This pointer is owned by the caller and must live through | 107 // rlim_max. This pointer is owned by the caller and must live through |
| 103 // the call to LaunchProcess(). | 108 // the call to LaunchProcess(). |
| 104 const std::vector<int>* maximize_rlimits; | 109 const std::vector<int>* maximize_rlimits; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 void RestoreDefaultExceptionHandler(); | 252 void RestoreDefaultExceptionHandler(); |
| 248 #endif // defined(OS_MACOSX) | 253 #endif // defined(OS_MACOSX) |
| 249 | 254 |
| 250 // Creates a LaunchOptions object suitable for launching processes in a test | 255 // Creates a LaunchOptions object suitable for launching processes in a test |
| 251 // binary. This should not be called in production/released code. | 256 // binary. This should not be called in production/released code. |
| 252 BASE_EXPORT LaunchOptions LaunchOptionsForTest(); | 257 BASE_EXPORT LaunchOptions LaunchOptionsForTest(); |
| 253 | 258 |
| 254 } // namespace base | 259 } // namespace base |
| 255 | 260 |
| 256 #endif // BASE_PROCESS_LAUNCH_H_ | 261 #endif // BASE_PROCESS_LAUNCH_H_ |
| OLD | NEW |