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

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

Issue 347783002: Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when nec… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 | « base/process/launch_mac.cc ('k') | content/browser/bootstrap_sandbox_mac.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <signal.h> 10 #include <signal.h>
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 limit.rlim_cur = limit.rlim_max; 378 limit.rlim_cur = limit.rlim_max;
379 if (setrlimit(resource, &limit) < 0) { 379 if (setrlimit(resource, &limit) < 0) {
380 RAW_LOG(WARNING, "setrlimit failed"); 380 RAW_LOG(WARNING, "setrlimit failed");
381 } 381 }
382 } 382 }
383 } 383 }
384 } 384 }
385 385
386 #if defined(OS_MACOSX) 386 #if defined(OS_MACOSX)
387 RestoreDefaultExceptionHandler(); 387 RestoreDefaultExceptionHandler();
388 if (!options.replacement_bootstrap_name.empty())
389 ReplaceBootstrapPort(options.replacement_bootstrap_name);
388 #endif // defined(OS_MACOSX) 390 #endif // defined(OS_MACOSX)
389 391
390 ResetChildSignalHandlersToDefaults(); 392 ResetChildSignalHandlersToDefaults();
391 SetSignalMask(orig_sigmask); 393 SetSignalMask(orig_sigmask);
392 394
393 #if 0 395 #if 0
394 // When debugging it can be helpful to check that we really aren't making 396 // When debugging it can be helpful to check that we really aren't making
395 // any hidden calls to malloc. 397 // any hidden calls to malloc.
396 void *malloc_thunk = 398 void *malloc_thunk =
397 reinterpret_cast<void*>(reinterpret_cast<intptr_t>(malloc) & ~4095); 399 reinterpret_cast<void*>(reinterpret_cast<intptr_t>(malloc) & ~4095);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 std::string* output, 655 std::string* output,
654 int* exit_code) { 656 int* exit_code) {
655 // Run |execve()| with the current environment and store "unlimited" data. 657 // Run |execve()| with the current environment and store "unlimited" data.
656 GetAppOutputInternalResult result = GetAppOutputInternal( 658 GetAppOutputInternalResult result = GetAppOutputInternal(
657 cl.argv(), NULL, output, std::numeric_limits<std::size_t>::max(), true, 659 cl.argv(), NULL, output, std::numeric_limits<std::size_t>::max(), true,
658 exit_code); 660 exit_code);
659 return result == EXECUTE_SUCCESS; 661 return result == EXECUTE_SUCCESS;
660 } 662 }
661 663
662 } // namespace base 664 } // namespace base
OLDNEW
« no previous file with comments | « base/process/launch_mac.cc ('k') | content/browser/bootstrap_sandbox_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698