aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr/thread/thr_syscalls.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-01-10 19:22:49 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-01-11 20:59:52 +0000
commit21f749da82e755aafab127618affeffb86cff9a5 (patch)
tree098b89a974c36f89652b952872c0977c31cbfd32 /lib/libthr/thread/thr_syscalls.c
parent4174e45fb4320dc27969c3fcbdd7d06e3b1150b8 (diff)
downloadsrc-21f749da82e755aafab127618affeffb86cff9a5.tar.gz
src-21f749da82e755aafab127618affeffb86cff9a5.zip
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28088
Diffstat (limited to 'lib/libthr/thread/thr_syscalls.c')
-rw-r--r--lib/libthr/thread/thr_syscalls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index 025dfc75fab6..c60308fcd1d2 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -687,6 +687,7 @@ __thr_interpose_libc(void)
SLOT(map_stacks_exec);
SLOT(fdatasync);
SLOT(clock_nanosleep);
+ SLOT(pdfork);
#undef SLOT
*(__libc_interposing_slot(
INTERPOS__pthread_mutex_init_calloc_cb)) =