From 6632abc8dc603a5f9d395f5c17740ba676b6987f Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Tue, 3 Jan 2006 15:34:27 +0000 Subject: For the ``#ifdef NOTYET'' code that allows calling non-async-safe functions in the child after a fork() from a threaded process, use __sys_setprocmask() rather than setprocmask() to keep our signal handling sane. Without this fix, signals are essentially ignored in said child and things such as protection violations result in an endless busy loop. Reviewed by: deischen --- lib/libkse/thread/thr_kern.c | 2 +- lib/libpthread/thread/thr_kern.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index be763c240104..ae3a2ff0bebe 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -225,7 +225,7 @@ _kse_single_thread(struct pthread *curthread) * Restore signal mask early, so any memory problems could * dump core. */ - sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); + __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); _thread_active_threads = 1; /* diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index be763c240104..ae3a2ff0bebe 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -225,7 +225,7 @@ _kse_single_thread(struct pthread *curthread) * Restore signal mask early, so any memory problems could * dump core. */ - sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); + __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); _thread_active_threads = 1; /* -- cgit v1.2.3