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

Side by Side Diff: base/process/launch.cc

Issue 831363002: Add the ability to run a callback between fork and exec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Readd closing read end. Created 5 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
« no previous file with comments | « base/process/launch.h ('k') | base/process/launch_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "base/process/launch.h" 5 #include "base/process/launch.h"
6 6
7 namespace base { 7 namespace base {
8 8
9 LaunchOptions::LaunchOptions() 9 LaunchOptions::LaunchOptions()
10 : wait(false), 10 : wait(false),
(...skipping 10 matching lines...) Expand all
21 force_breakaway_from_job_(false) 21 force_breakaway_from_job_(false)
22 #else 22 #else
23 clear_environ(false), 23 clear_environ(false),
24 fds_to_remap(NULL), 24 fds_to_remap(NULL),
25 maximize_rlimits(NULL), 25 maximize_rlimits(NULL),
26 new_process_group(false) 26 new_process_group(false)
27 #if defined(OS_LINUX) 27 #if defined(OS_LINUX)
28 , clone_flags(0) 28 , clone_flags(0)
29 , allow_new_privs(false) 29 , allow_new_privs(false)
30 #endif // OS_LINUX 30 #endif // OS_LINUX
31 #if defined(OS_POSIX)
32 , pre_exec_delegate(NULL)
33 #endif // OS_POSIX
31 #if defined(OS_CHROMEOS) 34 #if defined(OS_CHROMEOS)
32 , ctrl_terminal_fd(-1) 35 , ctrl_terminal_fd(-1)
33 #endif // OS_CHROMEOS 36 #endif // OS_CHROMEOS
34 #endif // !defined(OS_WIN) 37 #endif // !defined(OS_WIN)
35 { 38 {
36 } 39 }
37 40
38 LaunchOptions::~LaunchOptions() { 41 LaunchOptions::~LaunchOptions() {
39 } 42 }
40 43
41 LaunchOptions LaunchOptionsForTest() { 44 LaunchOptions LaunchOptionsForTest() {
42 LaunchOptions options; 45 LaunchOptions options;
43 #if defined(OS_LINUX) 46 #if defined(OS_LINUX)
44 // To prevent accidental privilege sharing to an untrusted child, processes 47 // To prevent accidental privilege sharing to an untrusted child, processes
45 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this 48 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
46 // new child will be used for testing only. 49 // new child will be used for testing only.
47 options.allow_new_privs = true; 50 options.allow_new_privs = true;
48 #endif 51 #endif
49 return options; 52 return options;
50 } 53 }
51 54
52 } // namespace base 55 } // namespace base
OLDNEW
« no previous file with comments | « base/process/launch.h ('k') | base/process/launch_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698