From: Lennart Poettering Date: Fri, 23 Feb 2024 11:19:43 +0000 (+0100) Subject: run: use sd_event_set_signal_exit() at one more place X-Git-Tag: v256-rc1~732^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=253740707594415e70398a31ff3f0036a4ac203b;p=thirdparty%2Fsystemd.git run: use sd_event_set_signal_exit() at one more place --- diff --git a/src/run/run.c b/src/run/run.c index ec0f4f700e4..5181c18c201 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -1751,9 +1751,9 @@ 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) >= 0); - (void) sd_event_add_signal(c.event, NULL, SIGINT, NULL, NULL); - (void) sd_event_add_signal(c.event, NULL, SIGTERM, NULL, NULL); + assert_se(sigprocmask_many(SIG_BLOCK, /* old_sigset=*/ NULL, SIGWINCH) >= 0); + + (void) sd_event_set_signal_exit(c.event, true); if (!arg_quiet) log_info("Press ^] three times within 1s to disconnect TTY.");