OLD | NEW |
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 <sched.h> | 10 #include <sched.h> |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 limit.rlim_cur = limit.rlim_max; | 402 limit.rlim_cur = limit.rlim_max; |
403 if (setrlimit(resource, &limit) < 0) { | 403 if (setrlimit(resource, &limit) < 0) { |
404 RAW_LOG(WARNING, "setrlimit failed"); | 404 RAW_LOG(WARNING, "setrlimit failed"); |
405 } | 405 } |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 #if defined(OS_MACOSX) | 410 #if defined(OS_MACOSX) |
411 RestoreDefaultExceptionHandler(); | 411 RestoreDefaultExceptionHandler(); |
412 if (!options.replacement_bootstrap_name.empty()) | |
413 ReplaceBootstrapPort(options.replacement_bootstrap_name); | |
414 #endif // defined(OS_MACOSX) | 412 #endif // defined(OS_MACOSX) |
415 | 413 |
416 ResetChildSignalHandlersToDefaults(); | 414 ResetChildSignalHandlersToDefaults(); |
417 SetSignalMask(orig_sigmask); | 415 SetSignalMask(orig_sigmask); |
418 | 416 |
419 #if 0 | 417 #if 0 |
420 // When debugging it can be helpful to check that we really aren't making | 418 // When debugging it can be helpful to check that we really aren't making |
421 // any hidden calls to malloc. | 419 // any hidden calls to malloc. |
422 void *malloc_thunk = | 420 void *malloc_thunk = |
423 reinterpret_cast<void*>(reinterpret_cast<intptr_t>(malloc) & ~4095); | 421 reinterpret_cast<void*>(reinterpret_cast<intptr_t>(malloc) & ~4095); |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 jmp_buf env; | 781 jmp_buf env; |
784 if (setjmp(env) == 0) { | 782 if (setjmp(env) == 0) { |
785 return CloneAndLongjmpInChild(flags, ptid, ctid, &env); | 783 return CloneAndLongjmpInChild(flags, ptid, ctid, &env); |
786 } | 784 } |
787 | 785 |
788 return 0; | 786 return 0; |
789 } | 787 } |
790 #endif // defined(OS_LINUX) || defined(OS_NACL_NONSFI) | 788 #endif // defined(OS_LINUX) || defined(OS_NACL_NONSFI) |
791 | 789 |
792 } // namespace base | 790 } // namespace base |
OLD | NEW |