diff options
author | 1999-02-01 08:24:42 +0000 | |
---|---|---|
committer | 1999-02-01 08:24:42 +0000 | |
commit | fd9c1b05ec0db4dd93447d3c6539a0cfb0000c13 (patch) | |
tree | e4870e3ffc61d526011f9147e3f292987ee15071 /lib/libpthread | |
parent | don't compute resource usage. this speeds things up a lot (diff) | |
download | wireguard-openbsd-fd9c1b05ec0db4dd93447d3c6539a0cfb0000c13.tar.xz wireguard-openbsd-fd9c1b05ec0db4dd93447d3c6539a0cfb0000c13.zip |
don't handle signals in the gc thread
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_gc.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |