diff options
Diffstat (limited to 'src/run/run.c')
-rw-r--r-- | src/run/run.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/run/run.c b/src/run/run.c index ec0f4f700e..5181c18c20 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."); |