summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-26 21:11:35 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-26 21:12:54 +0200
commit1b6d7fa742e303611dff8d7ebfa86ee5fb8b7dc7 (patch)
tree78fac28279b79bbf5465ce1b26b4200f55373e7e /src/core
parent1dedb74a2e1d840b531b76b01a76979f3b57456b (diff)
util: make use of newly added reset_signal_mask() call wherever appropriate
Diffstat (limited to 'src/core')
-rw-r--r--src/core/execute.c6
-rw-r--r--src/core/main.c7
2 files changed, 4 insertions, 9 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index b5b22472d5..066efd6fdf 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1301,7 +1301,6 @@ int exec_spawn(ExecCommand *command,
int dont_close[n_fds + 3];
uid_t uid = (uid_t) -1;
gid_t gid = (gid_t) -1;
- sigset_t ss;
int i, err;
/* child */
@@ -1319,9 +1318,8 @@ int exec_spawn(ExecCommand *command,
if (context->ignore_sigpipe)
ignore_signals(SIGPIPE, -1);
- assert_se(sigemptyset(&ss) == 0);
- if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0) {
- err = -errno;
+ err = reset_signal_mask();
+ if (err < 0) {
r = EXIT_SIGNAL_MASK;
goto fail_child;
}
diff --git a/src/core/main.c b/src/core/main.c
index bd148b1b33..95ab40fffc 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1834,7 +1834,6 @@ finish:
if (reexecute) {
const char **args;
unsigned i, args_size;
- sigset_t ss;
/* Close and disarm the watchdog, so that the new
* instance can reinitialize it, but doesn't get
@@ -1918,12 +1917,10 @@ finish:
args[i++] = NULL;
assert(i <= args_size);
- /* reenable any blocked signals, especially important
+ /* Reenable any blocked signals, especially important
* if we switch from initial ramdisk to init=... */
reset_all_signal_handlers();
-
- assert_se(sigemptyset(&ss) == 0);
- assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0);
+ reset_signal_mask();
if (switch_root_init) {
args[0] = switch_root_init;