summaryrefslogtreecommitdiff
path: root/src/libstddjb/sig_unblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/sig_unblock.c')
-rw-r--r--src/libstddjb/sig_unblock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstddjb/sig_unblock.c b/src/libstddjb/sig_unblock.c
new file mode 100644
index 0000000..26d5c1b
--- /dev/null
+++ b/src/libstddjb/sig_unblock.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <signal.h>
+#include <skalibs/sig.h>
+
+void sig_unblock (int sig)
+{
+ sigset_t ss ;
+ sigemptyset(&ss) ;
+ sigaddset(&ss, sig) ;
+ sigprocmask(SIG_UNBLOCK, &ss, 0) ;
+}