summaryrefslogtreecommitdiffstats
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-02-25 08:56:57 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-25 11:32:28 +0100
commit9c274488a9168f8284dc99882856ca79ce2aa132 (patch)
tree82f8a85d40d464998b08e9b0a8fb1c0719fa9f2e /src/nspawn
parentMerge pull request #18018 from bluca/mount_images_overlay (diff)
downloadsystemd-9c274488a9168f8284dc99882856ca79ce2aa132.tar.xz
systemd-9c274488a9168f8284dc99882856ca79ce2aa132.zip
signal-util: make -1 termination of ignore_signals() argument list unnecessary
Clean up ignore_signals() + default_signals() + sigaction_many() a bit: make it unnecessary to explicitly terminate the signal list with -1. Merge all three calls into a single function that is just called with slightly different parameters. And eliminate an unnecessary extra iteration in its inner for() loop. No change in behaviour.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index f38f8c2a87..44f457a5b5 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -4850,7 +4850,7 @@ static int run_container(
assert_se(sigprocmask(SIG_BLOCK, &mask_chld, NULL) >= 0);
/* Reset signal to default */
- r = default_signals(SIGCHLD, -1);
+ r = default_signals(SIGCHLD);
if (r < 0)
return log_error_errno(r, "Failed to reset SIGCHLD: %m");
@@ -5219,7 +5219,7 @@ static int run(int argc, char *argv[]) {
/* Ignore SIGPIPE here, because we use splice() on the ptyfwd stuff and that will generate SIGPIPE if
* the result is closed. Note that the container payload child will reset signal mask+handler anyway,
* so just turning this off here means we only turn it off in nspawn itself, not any children. */
- (void) ignore_signals(SIGPIPE, -1);
+ (void) ignore_signals(SIGPIPE);
n_fd_passed = sd_listen_fds(false);
if (n_fd_passed > 0) {