summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sigaction.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2001-01-24 13:03:38 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2001-01-24 13:03:38 +0000
commite5106342c6de9cbe26c4827e4e29bae309cd8cfb (patch)
tree5199387f09deaa21f12482317c165f815c4e8c2b /lib/libpthread/thread/thr_sigaction.c
parentf9447cd11209a5fb5ecef3f4cbe539e990f3b1bd (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigaction.c')
-rw-r--r--lib/libpthread/thread/thr_sigaction.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_sigaction.c b/lib/libpthread/thread/thr_sigaction.c
index 4d13819d5dbc..dba2f7e45254 100644
--- a/lib/libpthread/thread/thr_sigaction.c
+++ b/lib/libpthread/thread/thr_sigaction.c
@@ -33,10 +33,11 @@
*/
#include <signal.h>
#include <errno.h>
-#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
+#pragma weak sigaction=_sigaction
+
int
_sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
{
@@ -49,6 +50,9 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
errno = EINVAL;
ret = -1;
} else {
+ if (_thread_initial == NULL)
+ _thread_init();
+
/*
* Check if the existing signal action structure contents are
* to be returned:
@@ -98,7 +102,7 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
gact.sa_handler = (void (*) ()) _thread_sig_handler;
/* Change the signal action in the kernel: */
- if (_thread_sys_sigaction(sig,&gact,NULL) != 0)
+ if (__sys_sigaction(sig,&gact,NULL) != 0)
ret = -1;
}
}
@@ -106,6 +110,3 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
/* Return the completion status: */
return (ret);
}
-
-__strong_reference(_sigaction, sigaction);
-#endif