]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sighandler.c
Added bit_array_assign(), replaced BIT_ARRAY_ALLOC by functions.
[libucw.git] / lib / sighandler.c
index 3b9dfa0cff7d4792637863480ec9251a651d1a7e..ca8269083afc44ebc7836ebc0c6f41e9acecaedc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Catching of signals and calling callback functions
+ *     UCW Library -- Catching of signals and calling callback functions
  *
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
  */
@@ -29,6 +29,14 @@ handle_signal(int signum, struct sigaction *oldact)
   struct sigaction act;
   bzero(&act, sizeof(act));
   act.sa_handler = signal_handler_internal;
+  act.sa_flags = SA_NOMASK;
   if (sigaction(signum, &act, oldact) < 0)
     die("sigaction: %m");
 }
+
+void
+unhandle_signal(int signum, struct sigaction *oldact)
+{
+  if (sigaction(signum, oldact, NULL) < 0)
+    die("sigaction: %m");
+}