summaryrefslogtreecommitdiffstats
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2025-01-04 14:43:07 +0100
committerMike Yuan <me@yhndnzj.com>2025-01-04 16:40:53 +0100
commitbed4386e2946c483ddd762f01d742f5b45d18612 (patch)
treef4efa9f3a9bcd92ae3b77530b6ac38797c59845d /src/nspawn/nspawn.c
parentptyfwd: fix typo (diff)
downloadsystemd-bed4386e2946c483ddd762f01d742f5b45d18612.tar.xz
systemd-bed4386e2946c483ddd762f01d742f5b45d18612.zip
signal-util: generalize sigaction_nop_nocldstop
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index c2f232ae79..cc037c078f 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5175,11 +5175,6 @@ static int run_container(
pid_t *pid,
int *ret) {
- static const struct sigaction sa = {
- .sa_handler = nop_signal_handler,
- .sa_flags = SA_NOCLDSTOP|SA_RESTART,
- };
-
_cleanup_(release_lock_file) LockFile uid_shift_lock = LOCK_FILE_INIT;
_cleanup_close_ int etc_passwd_lock = -EBADF;
_cleanup_close_pair_ int
@@ -5240,7 +5235,7 @@ static int run_container(
if (r < 0)
return log_error_errno(errno, "Failed to change the signal mask: %m");
- r = sigaction(SIGCHLD, &sa, NULL);
+ r = sigaction(SIGCHLD, &sigaction_nop_nocldstop, NULL);
if (r < 0)
return log_error_errno(errno, "Failed to install SIGCHLD handler: %m");