aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 3e0f57e4..7276151f 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -841,12 +841,18 @@ char *xtzset(char *new)
}
// Set a signal handler
-void xsignal(int signal, void *handler)
+void xsignal_flags(int signal, void *handler, int flags)
{
struct sigaction *sa = (void *)libbuf;
memset(sa, 0, sizeof(struct sigaction));
sa->sa_handler = handler;
+ sa->sa_flags = flags;
if (sigaction(signal, sa, 0)) perror_exit("xsignal %d", signal);
}
+
+void xsignal(int signal, void *handler)
+{
+ xsignal_flags(signal, handler, 0);
+}