| 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 <set> | |
| 11 #include <string> | 10 #include <string> |
| 12 #include <utility> | 11 #include <utility> |
| 13 #include <vector> | 12 #include <vector> |
| 14 | 13 |
| 15 #include "base/base_export.h" | 14 #include "base/base_export.h" |
| 16 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 17 #include "base/environment.h" | 16 #include "base/environment.h" |
| 18 #include "base/process/process_handle.h" | 17 #include "base/process/process_handle.h" |
| 19 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
| 20 | 19 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 94 |
| 96 // If non-null, remap file descriptors according to the mapping of | 95 // If non-null, remap file descriptors according to the mapping of |
| 97 // src fd->dest fd to propagate FDs into the child process. | 96 // src fd->dest fd to propagate FDs into the child process. |
| 98 // This pointer is owned by the caller and must live through the | 97 // This pointer is owned by the caller and must live through the |
| 99 // call to LaunchProcess(). | 98 // call to LaunchProcess(). |
| 100 const FileHandleMappingVector* fds_to_remap; | 99 const FileHandleMappingVector* fds_to_remap; |
| 101 | 100 |
| 102 // Each element is an RLIMIT_* constant that should be raised to its | 101 // Each element is an RLIMIT_* constant that should be raised to its |
| 103 // rlim_max. This pointer is owned by the caller and must live through | 102 // rlim_max. This pointer is owned by the caller and must live through |
| 104 // the call to LaunchProcess(). | 103 // the call to LaunchProcess(). |
| 105 const std::set<int>* maximize_rlimits; | 104 const std::vector<int>* maximize_rlimits; |
| 106 | 105 |
| 107 // If true, start the process in a new process group, instead of | 106 // If true, start the process in a new process group, instead of |
| 108 // inheriting the parent's process group. The pgid of the child process | 107 // inheriting the parent's process group. The pgid of the child process |
| 109 // will be the same as its pid. | 108 // will be the same as its pid. |
| 110 bool new_process_group; | 109 bool new_process_group; |
| 111 | 110 |
| 112 #if defined(OS_LINUX) | 111 #if defined(OS_LINUX) |
| 113 // If non-zero, start the process using clone(), using flags as provided. | 112 // If non-zero, start the process using clone(), using flags as provided. |
| 114 int clone_flags; | 113 int clone_flags; |
| 115 #endif // defined(OS_LINUX) | 114 #endif // defined(OS_LINUX) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // instance running inside the parent. The parent's Breakpad instance should | 229 // instance running inside the parent. The parent's Breakpad instance should |
| 231 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 230 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 232 // in the child after forking will restore the standard exception handler. | 231 // in the child after forking will restore the standard exception handler. |
| 233 // See http://crbug.com/20371/ for more details. | 232 // See http://crbug.com/20371/ for more details. |
| 234 void RestoreDefaultExceptionHandler(); | 233 void RestoreDefaultExceptionHandler(); |
| 235 #endif // defined(OS_MACOSX) | 234 #endif // defined(OS_MACOSX) |
| 236 | 235 |
| 237 } // namespace base | 236 } // namespace base |
| 238 | 237 |
| 239 #endif // BASE_PROCESS_LAUNCH_H_ | 238 #endif // BASE_PROCESS_LAUNCH_H_ |
| OLD | NEW |