summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_init.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-02-21 20:57:42 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-02-21 20:57:42 +0000
commit2f058413cfe2577ff949673b79467acaae6f84c1 (patch)
tree0c9d440e06384240ef50d379819479a1f78f34d2 /lib/libpthread/uthread/uthread_init.c
parent69c8245eaa9f927875fe309a24813a09c66d79ca (diff)
account for the process signal mask when dealing with signals; tested
a while ago by marc@ and brad@
Diffstat (limited to 'lib/libpthread/uthread/uthread_init.c')
-rw-r--r--lib/libpthread/uthread/uthread_init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_init.c b/lib/libpthread/uthread/uthread_init.c
index 39242c8fd22..d9f398c381b 100644
--- a/lib/libpthread/uthread/uthread_init.c
+++ b/lib/libpthread/uthread/uthread_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_init.c,v 1.20 2002/01/17 23:12:09 fgsch Exp $ */
+/* $OpenBSD: uthread_init.c,v 1.21 2002/02/21 20:57:41 fgsch Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -224,6 +224,9 @@ _thread_init(void)
act.sa_handler = (void (*) ()) _thread_sig_handler;
act.sa_flags = 0;
+ /* Clear pending signals for the process: */
+ sigemptyset(&_process_sigpending);
+
/* Initialize signal handling: */
_thread_sig_init();
@@ -261,6 +264,9 @@ _thread_init(void)
PANIC("Cannot initialize signal handler");
}
+ /* Get the process signal mask: */
+ _thread_sys_sigprocmask(SIG_SETMASK, NULL, &_process_sigmask);
+
/* Get the kernel clockrate: */
mib[0] = CTL_KERN;
mib[1] = KERN_CLOCKRATE;