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 | 1f73ba6053432abc9dde213bc03460d7a75e3f3d (patch) | |
| tree | b9a49ad772e4a014da75d154f06fb273b277aea6 /compiler-rt/lib/sanitizer_common/sanitizer_posix.h | |
| parent | e08533577f2c25060ff1f691648eabc4bfe85069 (diff) | |
| download | bcm5719-llvm-1f73ba6053432abc9dde213bc03460d7a75e3f3d.tar.gz bcm5719-llvm-1f73ba6053432abc9dde213bc03460d7a75e3f3d.zip | |
[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
llvm-svn: 253666
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_posix.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_posix.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h index 19fa505c525..c0426a0b23f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h @@ -54,6 +54,7 @@ uptr internal_ptrace(int request, int pid, void *addr, void *data); uptr internal_waitpid(int pid, int *status, int options); int internal_fork(); +int internal_forkpty(int *amaster); // These functions call appropriate pthread_ functions directly, bypassing // the interceptor. They are weak and may not be present in some tools. |

