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

Side by Side Diff: base/process_util.h

Issue 7230057: Revert 90805 - I am submitting this with LGTMs from agl@ and evanm@. I'm marking this as TBR=jam@... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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')
Property Changes:
Added: svn:mergeinfo
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // Similar to the above two methods, but starts the child process in a process 279 // Similar to the above two methods, but starts the child process in a process
280 // group of its own, instead of allowing it to inherit the parent's process 280 // group of its own, instead of allowing it to inherit the parent's process
281 // group. The pgid of the child process will be the same as its pid. 281 // group. The pgid of the child process will be the same as its pid.
282 BASE_API bool LaunchAppInNewProcessGroup( 282 BASE_API bool LaunchAppInNewProcessGroup(
283 const std::vector<std::string>& argv, 283 const std::vector<std::string>& argv,
284 const environment_vector& environ, 284 const environment_vector& environ,
285 const file_handle_mapping_vector& fds_to_remap, 285 const file_handle_mapping_vector& fds_to_remap,
286 bool wait, 286 bool wait,
287 ProcessHandle* process_handle); 287 ProcessHandle* process_handle);
288 288
289 #if defined(OS_LINUX)
290 // Similar to LaunchApp variants above except uses clone(.. clone_flags ..)
291 // rather than fork(). This is useful for work inside the setuid sandbox.
292 BASE_API bool LaunchAppWithClone(const std::vector<std::string>& argv,
293 const file_handle_mapping_vector& fds_to_remap,
294 bool wait, ProcessHandle* process_handle,
295 int clone_flags);
296 #endif
297
298 // AlterEnvironment returns a modified environment vector, constructed from the 289 // AlterEnvironment returns a modified environment vector, constructed from the
299 // given environment and the list of changes given in |changes|. Each key in 290 // given environment and the list of changes given in |changes|. Each key in
300 // the environment is matched against the first element of the pairs. In the 291 // the environment is matched against the first element of the pairs. In the
301 // event of a match, the value is replaced by the second of the pair, unless 292 // event of a match, the value is replaced by the second of the pair, unless
302 // the second is empty, in which case the key-value is removed. 293 // the second is empty, in which case the key-value is removed.
303 // 294 //
304 // The returned array is allocated using new[] and must be freed by the caller. 295 // The returned array is allocated using new[] and must be freed by the caller.
305 BASE_API char** AlterEnvironment(const environment_vector& changes, 296 BASE_API char** AlterEnvironment(const environment_vector& changes,
306 const char* const* const env); 297 const char* const* const env);
307 #endif // defined(OS_POSIX) 298 #endif // defined(OS_POSIX)
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // instance running inside the parent. The parent's Breakpad instance should 675 // instance running inside the parent. The parent's Breakpad instance should
685 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 676 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
686 // in the child after forking will restore the standard exception handler. 677 // in the child after forking will restore the standard exception handler.
687 // See http://crbug.com/20371/ for more details. 678 // See http://crbug.com/20371/ for more details.
688 void RestoreDefaultExceptionHandler(); 679 void RestoreDefaultExceptionHandler();
689 #endif // defined(OS_MACOSX) 680 #endif // defined(OS_MACOSX)
690 681
691 } // namespace base 682 } // namespace base
692 683
693 #endif // BASE_PROCESS_UTIL_H_ 684 #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