diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-20 14:28:33 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-20 14:28:33 +0000 |
commit | 8dbf679e72e43d7c6b565417a8b0716943cb191b (patch) | |
tree | 04eff5d7bc067306898501ab9dca330a7e10fcd9 /lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | |
parent | bc3baa86f7b20c2d5b00294a8cd9f40be109d593 (diff) |
[sanitizer] Implement internal_fork and internal_forkpty for OS X
On Linux, we have internal_fork that forks without invoking user's pthread_atfork handlers, which is important for spawning external symbolizers. Let's implement this for OS X as well (using __fork). This patch also adds internal_forkpty which re-implements forkpty and uses __fork in it as well.
Differential Revision: http://reviews.llvm.org/D14869
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc index a19b0a678..3cf672f84 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -75,7 +75,7 @@ bool SymbolizerProcess::StartSymbolizerSubprocess() { #if SANITIZER_MAC fd_t fd = kInvalidFd; // Use forkpty to disable buffering in the new terminal. - pid = forkpty(&fd, 0, 0, 0); + pid = internal_forkpty(&fd); if (pid == -1) { // forkpty() failed. Report("WARNING: failed to fork external symbolizer (errno: %d)\n", |