summaryrefslogtreecommitdiffstats
path: root/misc.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2003-08-25 01:16:21 +0000
committerBen Lindstrom <mouring@eviladmin.org>2003-08-25 01:16:21 +0000
commit5ade9abc37df3dacacbe20104877ca6dab61082a (patch)
treeb3a521b87d93ecc0f1f17f4e659c1d4bf90f86f5 /misc.c
parentaf4a6c3a5619299a16cfbb545cde110849596204 (diff)
- (bal) redo how we handle 'mysignal()'. Move it to
openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to be our 'mysignal' by default. OK djm@
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/misc.c b/misc.c
index ff196619..c457a952 100644
--- a/misc.c
+++ b/misc.c
@@ -323,29 +323,3 @@ addargs(arglist *args, char *fmt, ...)
args->list[args->num++] = xstrdup(buf);
args->list[args->num] = NULL;
}
-
-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 defined(SA_INTERRUPT)
- if (sig == SIGALRM)
- sa.sa_flags |= SA_INTERRUPT;
-#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
-}