From 08f75dd11028dbc189470475602e24924ff26307 Mon Sep 17 00:00:00 2001 From: David Leonard Date: Mon, 1 Feb 1999 08:24:43 +0000 Subject: don't handle signals in the gc thread --- lib/libpthread/uthread/uthread_gc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/libpthread/uthread') diff --git a/lib/libpthread/uthread/uthread_gc.c b/lib/libpthread/uthread/uthread_gc.c index 33cddebe45a..56fbbb79e12 100644 --- a/lib/libpthread/uthread/uthread_gc.c +++ b/lib/libpthread/uthread/uthread_gc.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: uthread_gc.c,v 1.2 1998/09/30 19:17:51 dt Exp $ - * $OpenBSD: uthread_gc.c,v 1.3 1998/12/23 22:49:46 d Exp $ + * $OpenBSD: uthread_gc.c,v 1.4 1999/02/01 08:24:42 d Exp $ * * Garbage collector thread. Frees memory allocated for dead threads. * @@ -58,6 +58,12 @@ _thread_gc(pthread_addr_t arg) pthread_t pthread_prv; struct timespec abstime; void *p_stack; + sigset_t ss; + + /* Don't handle signals in this thread */ + sigfillset(&ss); + if (ret = pthread_sigmask(SIG_BLOCK, &ss, NULL)) + PANIC("Can't block signals in GC thread"); /* Set a debug flag based on an environment variable. */ f_debug = (getenv("LIBC_R_DEBUG") != NULL); -- cgit v1.2.3