summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/basic/signal-util.c4
-rw-r--r--src/basic/signal-util.h9
-rw-r--r--src/core/exec-invoke.c2
-rw-r--r--src/home/homed.c2
-rw-r--r--src/import/export.c4
-rw-r--r--src/import/import-common.c2
-rw-r--r--src/import/importd.c2
-rw-r--r--src/journal-remote/journal-remote-main.c2
-rw-r--r--src/journal-remote/journal-upload.c2
-rw-r--r--src/journal/journald-server.c2
-rw-r--r--src/libsystemd/sd-event/test-event.c10
-rw-r--r--src/login/logind.c4
-rw-r--r--src/machine/machinectl.c4
-rw-r--r--src/machine/machined.c2
-rw-r--r--src/network/wait-online/wait-online.c2
-rw-r--r--src/nspawn/nspawn.c2
-rw-r--r--src/oom/oomd.c2
-rw-r--r--src/portable/portabled.c2
-rw-r--r--src/resolve/resolved.c2
-rw-r--r--src/run/run.c2
-rw-r--r--src/shared/ask-password-api.c2
-rw-r--r--src/test/test-async.c2
-rw-r--r--src/test/test-execute.c2
-rw-r--r--src/test/test-mempress.c2
-rw-r--r--src/timesync/timesyncd.c2
-rw-r--r--src/timesync/wait-sync.c2
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c4
-rw-r--r--src/udev/test-udev-rule-runner.c2
-rw-r--r--src/udev/test-udev-spawn.c2
-rw-r--r--src/udev/udev-manager.c2
-rw-r--r--src/udev/udevadm-monitor.c2
-rw-r--r--src/userdb/userdbd.c2
-rw-r--r--src/vmspawn/vmspawn.c2
33 files changed, 47 insertions, 44 deletions
diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c
index cc5eddb00e..661ad00b11 100644
--- a/src/basic/signal-util.c
+++ b/src/basic/signal-util.c
@@ -84,7 +84,7 @@ static int sigset_add_many_ap(sigset_t *ss, va_list ap) {
return r;
}
-int sigset_add_many(sigset_t *ss, ...) {
+int sigset_add_many_internal(sigset_t *ss, ...) {
va_list ap;
int r;
@@ -95,7 +95,7 @@ int sigset_add_many(sigset_t *ss, ...) {
return r;
}
-int sigprocmask_many(int how, sigset_t *old, ...) {
+int sigprocmask_many_internal(int how, sigset_t *old, ...) {
va_list ap;
sigset_t ss;
int r;
diff --git a/src/basic/signal-util.h b/src/basic/signal-util.h
index ad2ba841c6..8826fbeb7b 100644
--- a/src/basic/signal-util.h
+++ b/src/basic/signal-util.h
@@ -31,8 +31,11 @@ int sigaction_many_internal(const struct sigaction *sa, ...);
#define sigaction_many(sa, ...) \
sigaction_many_internal(sa, __VA_ARGS__, -1)
-int sigset_add_many(sigset_t *ss, ...);
-int sigprocmask_many(int how, sigset_t *old, ...);
+int sigset_add_many_internal(sigset_t *ss, ...);
+#define sigset_add_many(...) sigset_add_many_internal(__VA_ARGS__, -1)
+
+int sigprocmask_many_internal(int how, sigset_t *old, ...);
+#define sigprocmask_many(...) sigprocmask_many_internal(__VA_ARGS__, -1)
const char *signal_to_string(int i) _const_;
int signal_from_string(const char *s) _pure_;
@@ -46,7 +49,7 @@ static inline void block_signals_reset(sigset_t *ss) {
#define BLOCK_SIGNALS(...) \
_cleanup_(block_signals_reset) _unused_ sigset_t _saved_sigset = ({ \
sigset_t _t; \
- assert_se(sigprocmask_many(SIG_BLOCK, &_t, __VA_ARGS__, -1) >= 0); \
+ assert_se(sigprocmask_many(SIG_BLOCK, &_t, __VA_ARGS__) >= 0); \
_t; \
})
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
index 1bd21a2bdf..b1298670c7 100644
--- a/src/core/exec-invoke.c
+++ b/src/core/exec-invoke.c
@@ -1170,7 +1170,7 @@ static int setup_pam(
/* Block SIGTERM, so that we know that it won't get lost in the child */
- assert_se(sigprocmask_many(SIG_BLOCK, &old_ss, SIGTERM, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, &old_ss, SIGTERM) >= 0);
parent_pid = getpid_cached();
diff --git a/src/home/homed.c b/src/home/homed.c
index 04d9b56f07..cfb498e47f 100644
--- a/src/home/homed.c
+++ b/src/home/homed.c
@@ -29,7 +29,7 @@ static int run(int argc, char *argv[]) {
umask(0022);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/import/export.c b/src/import/export.c
index 7e941a29af..cd67349a4e 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -105,7 +105,7 @@ static int export_tar(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to allocate event loop: %m");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
(void) sd_event_add_signal(event, NULL, SIGTERM, interrupt_signal_handler, NULL);
(void) sd_event_add_signal(event, NULL, SIGINT, interrupt_signal_handler, NULL);
@@ -181,7 +181,7 @@ static int export_raw(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to allocate event loop: %m");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
(void) sd_event_add_signal(event, NULL, SIGTERM, interrupt_signal_handler, NULL);
(void) sd_event_add_signal(event, NULL, SIGINT, interrupt_signal_handler, NULL);
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 319aa078a7..4a8a9a9c20 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -295,7 +295,7 @@ int import_allocate_event_with_signals(sd_event **ret) {
if (r < 0)
return log_error_errno(r, "Failed to allocate event loop: %m");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
(void) sd_event_add_signal(event, NULL, SIGTERM, interrupt_signal_handler, NULL);
(void) sd_event_add_signal(event, NULL, SIGINT, interrupt_signal_handler, NULL);
diff --git a/src/import/importd.c b/src/import/importd.c
index d25c23c6dc..24b8e9f92e 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -1374,7 +1374,7 @@ static int run(int argc, char *argv[]) {
umask(0022);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
index 6c09c068c8..7431403e4b 100644
--- a/src/journal-remote/journal-remote-main.c
+++ b/src/journal-remote/journal-remote-main.c
@@ -540,7 +540,7 @@ static int setup_signals(RemoteServer *s) {
assert(s);
- assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM) >= 0);
r = sd_event_add_signal(s->events, &s->sigterm_event, SIGTERM, NULL, s);
if (r < 0)
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 97b5f929ab..50fa31a133 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -397,7 +397,7 @@ static int setup_signals(Uploader *u) {
assert(u);
- assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM) >= 0);
r = sd_event_add_signal(u->events, &u->sigterm_event, SIGTERM, dispatch_sigterm, u);
if (r < 0)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 2c6f6e301d..9e1ca08d23 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1727,7 +1727,7 @@ static int server_setup_signals(Server *s) {
assert(s);
- assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, SIGRTMIN+18) >= 0);
r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s);
if (r < 0)
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 63d3ee7284..e02de097ba 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -92,7 +92,7 @@ static int signal_handler(sd_event_source *s, const struct signalfd_siginfo *si,
assert_se(userdata == INT_TO_PTR('e'));
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGUSR2, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGUSR2) >= 0);
pid = fork();
assert_se(pid >= 0);
@@ -142,7 +142,7 @@ static int defer_handler(sd_event_source *s, void *userdata) {
assert_se(userdata == INT_TO_PTR('d'));
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGUSR1, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGUSR1) >= 0);
assert_se(sd_event_add_signal(sd_event_source_get_event(s), &p, SIGUSR1, signal_handler, INT_TO_PTR('e')) >= 0);
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
@@ -254,7 +254,7 @@ static void test_basic_one(bool with_pidfd) {
assert_se(sd_event_source_set_prepare(z, prepare_handler) >= 0);
/* Test for floating event sources */
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+1, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+1) >= 0);
assert_se(sd_event_add_signal(e, NULL, SIGRTMIN+1, NULL, NULL) >= 0);
assert_se(write(a[1], &ch, 1) >= 0);
@@ -346,7 +346,7 @@ TEST(rtqueue) {
assert_se(sd_event_default(&e) >= 0);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+2, SIGRTMIN+3, SIGUSR2, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+2, SIGRTMIN+3, SIGUSR2) >= 0);
assert_se(sd_event_add_signal(e, &u, SIGRTMIN+2, rtqueue_handler, NULL) >= 0);
assert_se(sd_event_add_signal(e, &v, SIGRTMIN+3, rtqueue_handler, NULL) >= 0);
assert_se(sd_event_add_signal(e, &s, SIGUSR2, rtqueue_handler, NULL) >= 0);
@@ -556,7 +556,7 @@ TEST(pidfd) {
int pidfd;
pid_t pid, pid2;
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
pid = fork();
if (pid == 0)
diff --git a/src/login/logind.c b/src/login/logind.c
index 7b6467d63a..415d63da1f 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -832,7 +832,7 @@ static int manager_connect_console(Manager *m) {
SIGRTMIN, SIGRTMAX);
assert_se(ignore_signals(SIGRTMIN + 1) >= 0);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN) >= 0);
r = sd_event_add_signal(m->event, NULL, SIGRTMIN, manager_vt_switch, m);
if (r < 0)
@@ -1244,7 +1244,7 @@ static int run(int argc, char *argv[]) {
(void) mkdir_label("/run/systemd/users", 0755);
(void) mkdir_label("/run/systemd/sessions", 0755);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGHUP, SIGTERM, SIGINT, SIGCHLD, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGHUP, SIGTERM, SIGINT, SIGCHLD, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 9c0aa035e5..99b1f79460 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -1201,7 +1201,7 @@ static int process_forward(sd_event *event, PTYForward **forward, int master, PT
assert(master >= 0);
assert(name);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGWINCH, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGWINCH, SIGTERM, SIGINT) >= 0);
if (!arg_quiet) {
if (streq(name, ".host"))
@@ -1952,7 +1952,7 @@ static int transfer_image_common(sd_bus *bus, sd_bus_message *m) {
if (r < 0)
return bus_log_parse_error(r);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
if (!arg_quiet)
log_info("Enqueued transfer job %u. Press C-c to continue download in background.", id);
diff --git a/src/machine/machined.c b/src/machine/machined.c
index 108fe0327b..99301408d3 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -342,7 +342,7 @@ static int run(int argc, char *argv[]) {
* make sure this check stays in. */
(void) mkdir_label("/run/systemd/machines", 0755);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/network/wait-online/wait-online.c b/src/network/wait-online/wait-online.c
index 544c360edd..4f8270ddfa 100644
--- a/src/network/wait-online/wait-online.c
+++ b/src/network/wait-online/wait-online.c
@@ -204,7 +204,7 @@ static int run(int argc, char *argv[]) {
if (arg_quiet)
log_set_max_level(LOG_ERR);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
r = manager_new(&m, arg_interfaces, arg_ignore, arg_required_operstate, arg_required_family, arg_any, arg_timeout);
if (r < 0)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 49b57c5168..05f5027600 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5994,7 +5994,7 @@ static int run(int argc, char *argv[]) {
special_glyph(SPECIAL_GLYPH_LIGHT_SHADE), ansi_grey(), ansi_highlight(), ansi_grey(), ansi_normal());
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGWINCH, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGWINCH, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = make_reaper_process(true);
if (r < 0) {
diff --git a/src/oom/oomd.c b/src/oom/oomd.c
index ecc2eda5dc..b43635d6d4 100644
--- a/src/oom/oomd.c
+++ b/src/oom/oomd.c
@@ -164,7 +164,7 @@ static int run(int argc, char *argv[]) {
if (!FLAGS_SET(mask, CGROUP_MASK_MEMORY))
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Requires the cgroup memory controller.");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
if (arg_mem_pressure_usec > 0 && arg_mem_pressure_usec < 1 * USEC_PER_SEC)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "DefaultMemoryPressureDurationSec= must be 0 or at least 1s");
diff --git a/src/portable/portabled.c b/src/portable/portabled.c
index d4a01fa53b..d46ac018a3 100644
--- a/src/portable/portabled.c
+++ b/src/portable/portabled.c
@@ -141,7 +141,7 @@ static int run(int argc, char *argv[]) {
if (argc != 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c
index 1625c5189d..664e7dd653 100644
--- a/src/resolve/resolved.c
+++ b/src/resolve/resolved.c
@@ -67,7 +67,7 @@ static int run(int argc, char *argv[]) {
return log_error_errno(r, "Failed to drop privileges: %m");
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGRTMIN+1, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGRTMIN+1, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/run/run.c b/src/run/run.c
index b42ed44231..a79ceafbe1 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -1749,7 +1749,7 @@ static int start_transient_service(sd_bus *bus) {
return log_error_errno(r, "Failed to get event loop: %m");
if (master >= 0) {
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGWINCH, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGWINCH, SIGTERM, SIGINT) >= 0);
(void) sd_event_add_signal(c.event, NULL, SIGINT, NULL, NULL);
(void) sd_event_add_signal(c.event, NULL, SIGTERM, NULL, NULL);
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index 462b3d2e00..bf79dc2633 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -713,7 +713,7 @@ int ask_password_agent(
return -EUNATCH;
assert_se(sigemptyset(&mask) >= 0);
- assert_se(sigset_add_many(&mask, SIGINT, SIGTERM, -1) >= 0);
+ assert_se(sigset_add_many(&mask, SIGINT, SIGTERM) >= 0);
assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) >= 0);
(void) mkdir_p_label("/run/systemd/ask-password", 0755);
diff --git a/src/test/test-async.c b/src/test/test-async.c
index 75bc4d8238..e9f10fdae3 100644
--- a/src/test/test-async.c
+++ b/src/test/test-async.c
@@ -71,7 +71,7 @@ TEST(asynchronous_rm_rf) {
/* child */
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
assert_se(make_reaper_process(true) >= 0);
assert_se(mkdtemp_malloc(NULL, &tt) >= 0);
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 4f6ad5dcae..148e44b13d 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -652,7 +652,7 @@ static int find_libraries(const char *exec, char ***ret) {
assert_se(exec);
assert_se(ret);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
assert_se(pipe2(outpipe, O_NONBLOCK|O_CLOEXEC) == 0);
assert_se(pipe2(errpipe, O_NONBLOCK|O_CLOEXEC) == 0);
diff --git a/src/test/test-mempress.c b/src/test/test-mempress.c
index 23d09813d9..1c3f6463b2 100644
--- a/src/test/test-mempress.c
+++ b/src/test/test-mempress.c
@@ -233,7 +233,7 @@ TEST(real_pressure) {
_exit(EXIT_SUCCESS);
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
assert_se(sd_event_add_child(e, &cs, pid, WEXITED, real_pressure_child_callback, NULL) >= 0);
assert_se(sd_event_source_set_child_process_own(cs, true) >= 0);
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 1d8ebecc91..5c308a04bc 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -174,7 +174,7 @@ static int run(int argc, char *argv[]) {
return log_error_errno(r, "Failed to drop privileges: %m");
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/timesync/wait-sync.c b/src/timesync/wait-sync.c
index 832e117096..b6c167b0f9 100644
--- a/src/timesync/wait-sync.c
+++ b/src/timesync/wait-sync.c
@@ -184,7 +184,7 @@ static int run(int argc, char * argv[]) {
};
int r;
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
r = sd_event_default(&event);
if (r < 0)
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index df979be5cd..31b284b502 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -356,7 +356,7 @@ static int process_and_watch_password_files(bool watch) {
(void) mkdir_p_label("/run/systemd/ask-password", 0755);
assert_se(sigemptyset(&mask) >= 0);
- assert_se(sigset_add_many(&mask, SIGTERM, -1) >= 0);
+ assert_se(sigset_add_many(&mask, SIGTERM) >= 0);
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) >= 0);
if (watch) {
@@ -556,7 +556,7 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char **arguments
assert_se(sigaction(SIGCHLD, &sigchld, NULL) >= 0);
assert_se(sigaction(SIGHUP, &sighup, NULL) >= 0);
- assert_se(sigprocmask_many(SIG_UNBLOCK, NULL, SIGHUP, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_UNBLOCK, NULL, SIGHUP, SIGCHLD) >= 0);
r = safe_fork("(sd-passwd)", FORK_RESET_SIGNALS|FORK_LOG, ret_pid);
if (r < 0)
diff --git a/src/udev/test-udev-rule-runner.c b/src/udev/test-udev-rule-runner.c
index fa6c59c762..f5aa38ac3e 100644
--- a/src/udev/test-udev-rule-runner.c
+++ b/src/udev/test-udev-rule-runner.c
@@ -144,7 +144,7 @@ static int run(int argc, char *argv[]) {
assert_se(event = udev_event_new(dev, NULL));
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGHUP, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGHUP, SIGCHLD) >= 0);
/* do what devtmpfs usually provides us */
if (sd_device_get_devname(dev, &devname) >= 0) {
diff --git a/src/udev/test-udev-spawn.c b/src/udev/test-udev-spawn.c
index 8486676821..0102d8d707 100644
--- a/src/udev/test-udev-spawn.c
+++ b/src/udev/test-udev-spawn.c
@@ -97,7 +97,7 @@ int main(int argc, char *argv[]) {
test_setup_logging(LOG_DEBUG);
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
test_event_spawn_cat(true, SIZE_MAX);
test_event_spawn_cat(false, SIZE_MAX);
diff --git a/src/udev/udev-manager.c b/src/udev/udev-manager.c
index 31944c2247..0b6cfb1655 100644
--- a/src/udev/udev-manager.c
+++ b/src/udev/udev-manager.c
@@ -1308,7 +1308,7 @@ int manager_main(Manager *manager) {
udev_watch_restore(manager->inotify_fd);
/* block SIGCHLD for listening child events. */
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
r = sd_event_default(&manager->event);
if (r < 0)
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c
index 27c4853c4d..b1124df76a 100644
--- a/src/udev/udevadm-monitor.c
+++ b/src/udev/udevadm-monitor.c
@@ -208,7 +208,7 @@ int monitor_main(int argc, char *argv[], void *userdata) {
goto finalize;
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
(void) sd_event_add_signal(event, NULL, SIGTERM, NULL, NULL);
(void) sd_event_add_signal(event, NULL, SIGINT, NULL, NULL);
diff --git a/src/userdb/userdbd.c b/src/userdb/userdbd.c
index 89ac9c7ba9..cbe4c8e4f8 100644
--- a/src/userdb/userdbd.c
+++ b/src/userdb/userdbd.c
@@ -37,7 +37,7 @@ static int run(int argc, char *argv[]) {
if (setenv("SYSTEMD_BYPASS_USERDB", "io.systemd.NameServiceSwitch:io.systemd.Multiplexer:io.systemd.DropIn", 1) < 0)
return log_error_errno(errno, "Failed to set $SYSTEMD_BYPASS_USERDB: %m");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
r = manager_new(&m);
if (r < 0)
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index f67c6a51bc..2cffd32a00 100644
--- a/src/vmspawn/vmspawn.c
+++ b/src/vmspawn/vmspawn.c
@@ -1570,7 +1570,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
log_debug("Executing: %s", joined);
}
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD) >= 0);
_cleanup_(sd_event_source_unrefp) sd_event_source *notify_event_source = NULL;
_cleanup_(sd_event_unrefp) sd_event *event = NULL;