]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/signal-util.c
util-lib: move string table stuff into its own string-table.[ch]
[thirdparty/systemd.git] / src / basic / signal-util.c
index 84cf42b2857720757416cdc16aa6ff732d0a8f53..8038bc891d52a3e963dca591da7394db9207814b 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
+#include "parse-util.h"
 #include "signal-util.h"
+#include "string-table.h"
+#include "string-util.h"
+#include "util.h"
 
 int reset_all_signal_handlers(void) {
         static const struct sigaction sa = {
@@ -159,7 +162,7 @@ int sigset_add_many(sigset_t *ss, ...) {
         return r;
 }
 
-int sigprocmask_many(int how, ...) {
+int sigprocmask_many(int how, sigset_t *old, ...) {
         va_list ap;
         sigset_t ss;
         int r;
@@ -167,14 +170,14 @@ int sigprocmask_many(int how, ...) {
         if (sigemptyset(&ss) < 0)
                 return -errno;
 
-        va_start(ap, how);
+        va_start(ap, old);
         r = sigset_add_many_ap(&ss, ap);
         va_end(ap);
 
         if (r < 0)
                 return r;
 
-        if (sigprocmask(how, &ss, NULL) < 0)
+        if (sigprocmask(how, &ss, old) < 0)
                 return -errno;
 
         return 0;
@@ -266,3 +269,7 @@ int signal_from_string_try_harder(const char *s) {
 
         return signo;
 }
+
+void nop_signal_handler(int sig) {
+        /* nothing here */
+}