summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-01-23 18:55:24 +1100
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 18:55:24 +1100
commit84226b447d45fe4542613de68c2ca59a890d7c01 (patch)
tree6f64b6646b874a98705c0aeb50c6863daa92ca1d
parent5533c2fb7ef21172fa3708d66b03faa2c6b3d93f (diff)
Remove mysignal wrapper.
We switched the main code to use sigaction(), so the wrapper is no longer used.
-rw-r--r--openbsd-compat/bsd-signal.c33
-rw-r--r--openbsd-compat/bsd-signal.h5
2 files changed, 0 insertions, 38 deletions
diff --git a/openbsd-compat/bsd-signal.c b/openbsd-compat/bsd-signal.c
index 104ab653..38d5e972 100644
--- a/openbsd-compat/bsd-signal.c
+++ b/openbsd-compat/bsd-signal.c
@@ -23,39 +23,6 @@
#include "openbsd-compat/bsd-signal.h"
-#undef signal
-
-mysig_t
-mysignal(int sig, mysig_t act)
-{
-#ifdef HAVE_SIGACTION
- struct sigaction sa, osa;
-
- if (sigaction(sig, NULL, &osa) == -1)
- return (mysig_t) -1;
- if (osa.sa_handler != act) {
- memset(&sa, 0, sizeof(sa));
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sig == SIGALRM) {
-#ifdef SA_INTERRUPT
- sa.sa_flags |= SA_INTERRUPT;
-#endif
- } else {
-#ifdef SA_RESTART
- sa.sa_flags |= SA_RESTART;
-#endif
- }
- sa.sa_handler = act;
- if (sigaction(sig, &sa, NULL) == -1)
- return (mysig_t) -1;
- }
- return (osa.sa_handler);
-#else
- return (signal(sig, act));
-#endif
-}
-
#if !defined(HAVE_STRSIGNAL)
char *strsignal(int sig)
{
diff --git a/openbsd-compat/bsd-signal.h b/openbsd-compat/bsd-signal.h
index 4cb8cb7a..dafb4b19 100644
--- a/openbsd-compat/bsd-signal.h
+++ b/openbsd-compat/bsd-signal.h
@@ -27,11 +27,6 @@
# endif
#endif
-/* wrapper for signal interface */
-typedef void (*mysig_t)(int);
-mysig_t mysignal(int sig, mysig_t act);
-#define signal(a,b) mysignal(a,b)
-
#if !defined(HAVE_STRSIGNAL)
char *strsignal(int);
#endif