Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: base/process_util.h

Issue 9176013: [ChromeOS] Add option to set controlling terminal when launching process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/namespace contains utility functions for enumerating, ending and 5 // This file/namespace contains utility functions for enumerating, ending and
6 // computing statistics of processes. 6 // computing statistics of processes.
7 7
8 #ifndef BASE_PROCESS_UTIL_H_ 8 #ifndef BASE_PROCESS_UTIL_H_
9 #define BASE_PROCESS_UTIL_H_ 9 #define BASE_PROCESS_UTIL_H_
10 #pragma once 10 #pragma once
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 LaunchOptions() : wait(false), 218 LaunchOptions() : wait(false),
219 #if defined(OS_WIN) 219 #if defined(OS_WIN)
220 start_hidden(false), inherit_handles(false), as_user(NULL), 220 start_hidden(false), inherit_handles(false), as_user(NULL),
221 empty_desktop_name(false), job_handle(NULL) 221 empty_desktop_name(false), job_handle(NULL)
222 #else 222 #else
223 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL), 223 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL),
224 new_process_group(false) 224 new_process_group(false)
225 #if defined(OS_LINUX) 225 #if defined(OS_LINUX)
226 , clone_flags(0) 226 , clone_flags(0)
227 #endif // OS_LINUX 227 #endif // OS_LINUX
228 #if defined(OS_CHROMEOS)
229 , ctrl_terminal_fd(-1)
230 #endif // OS_CHROMEOS
228 #if defined(OS_MACOSX) 231 #if defined(OS_MACOSX)
229 , synchronize(NULL) 232 , synchronize(NULL)
230 #endif // defined(OS_MACOSX) 233 #endif // defined(OS_MACOSX)
231 #endif // !defined(OS_WIN) 234 #endif // !defined(OS_WIN)
232 {} 235 {}
233 236
234 // If true, wait for the process to complete. 237 // If true, wait for the process to complete.
235 bool wait; 238 bool wait;
236 239
237 #if defined(OS_WIN) 240 #if defined(OS_WIN)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // If true, start the process in a new process group, instead of 278 // If true, start the process in a new process group, instead of
276 // inheriting the parent's process group. The pgid of the child process 279 // inheriting the parent's process group. The pgid of the child process
277 // will be the same as its pid. 280 // will be the same as its pid.
278 bool new_process_group; 281 bool new_process_group;
279 282
280 #if defined(OS_LINUX) 283 #if defined(OS_LINUX)
281 // If non-zero, start the process using clone(), using flags as provided. 284 // If non-zero, start the process using clone(), using flags as provided.
282 int clone_flags; 285 int clone_flags;
283 #endif // defined(OS_LINUX) 286 #endif // defined(OS_LINUX)
284 287
288 #if defined(OS_CHROMEOS)
289 // If non-negative, the specified file descriptor will be set as the launched
290 // process' controlling terminal.
291 int ctrl_terminal_fd;
292 #endif // defined(OS_CHROMEOS)
293
285 #if defined(OS_MACOSX) 294 #if defined(OS_MACOSX)
286 // When non-NULL, a new LaunchSynchronizationHandle will be created and 295 // When non-NULL, a new LaunchSynchronizationHandle will be created and
287 // stored in *synchronize whenever LaunchProcess returns true in the parent 296 // stored in *synchronize whenever LaunchProcess returns true in the parent
288 // process. The child process will have been created (with fork) but will 297 // process. The child process will have been created (with fork) but will
289 // be waiting (before exec) for the parent to call LaunchSynchronize with 298 // be waiting (before exec) for the parent to call LaunchSynchronize with
290 // this handle. Only when LaunchSynchronize is called will the child be 299 // this handle. Only when LaunchSynchronize is called will the child be
291 // permitted to continue execution and call exec. LaunchSynchronize 300 // permitted to continue execution and call exec. LaunchSynchronize
292 // destroys the handle created by LaunchProcess. 301 // destroys the handle created by LaunchProcess.
293 // 302 //
294 // When synchronize is non-NULL, the parent must call LaunchSynchronize 303 // When synchronize is non-NULL, the parent must call LaunchSynchronize
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 // instance running inside the parent. The parent's Breakpad instance should 823 // instance running inside the parent. The parent's Breakpad instance should
815 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 824 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
816 // in the child after forking will restore the standard exception handler. 825 // in the child after forking will restore the standard exception handler.
817 // See http://crbug.com/20371/ for more details. 826 // See http://crbug.com/20371/ for more details.
818 void RestoreDefaultExceptionHandler(); 827 void RestoreDefaultExceptionHandler();
819 #endif // defined(OS_MACOSX) 828 #endif // defined(OS_MACOSX)
820 829
821 } // namespace base 830 } // namespace base
822 831
823 #endif // BASE_PROCESS_UTIL_H_ 832 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698