summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_fork.c')
-rw-r--r--lib/libthr/thread/thr_fork.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
index f20942d..8e1ea6a 100644
--- a/lib/libthr/thread/thr_fork.c
+++ b/lib/libthr/thread/thr_fork.c
@@ -115,6 +115,7 @@ __pthread_cxa_finalize(struct dl_phdr_info *phdr_info)
}
THR_UMUTEX_UNLOCK(curthread, &_thr_atfork_lock);
_thr_tsd_unload(phdr_info);
+ _thr_sigact_unload(phdr_info);
}
__weak_reference(_fork, fork);
@@ -161,6 +162,7 @@ _fork(void)
* Block all signals until we reach a safe point.
*/
_thr_signal_block(curthread);
+ _thr_signal_prefork();
/* Fork a new process: */
if ((ret = __sys_fork()) == 0) {
@@ -182,6 +184,8 @@ _fork(void)
_thr_umutex_init(&curthread->lock);
_thr_umutex_init(&_thr_atfork_lock);
+ _thr_signal_postfork_child();
+
if (was_threaded)
_rtld_atfork_post(rtld_locks);
_thr_setthreaded(0);
@@ -211,6 +215,8 @@ _fork(void)
/* Parent process */
errsave = errno;
+ _thr_signal_postfork();
+
/* Ready to continue, unblock signals. */
_thr_signal_unblock(curthread);
OpenPOWER on IntegriCloud