diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-15 20:35:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-15 20:35:18 +0200 |
commit | 86b85cf440324c4be2d49472e40dbb6ec0faa330 (patch) | |
tree | d3f0da63487dd124e490aef54aa710dbab6032dc /src/run | |
parent | 78ed65ac8dd05041f08ba8b089e1e87445a0905f (diff) | |
parent | 72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9 (diff) |
Merge pull request #214 from poettering/signal-rework-2
everywhere: port everything to sigprocmask_many() and friends
Diffstat (limited to 'src/run')
-rw-r--r-- | src/run/run.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/run/run.c b/src/run/run.c index f18f77b55a..99d960a664 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -789,19 +789,16 @@ static int start_transient_service( if (master >= 0) { _cleanup_(pty_forward_freep) PTYForward *forward = NULL; _cleanup_event_unref_ sd_event *event = NULL; - sigset_t mask; char last_char = 0; r = sd_event_default(&event); if (r < 0) return log_error_errno(r, "Failed to get event loop: %m"); - assert_se(sigemptyset(&mask) == 0); - sigset_add_many(&mask, SIGWINCH, SIGTERM, SIGINT, -1); - assert_se(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); + assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGWINCH, SIGTERM, SIGINT, -1) >= 0); - sd_event_add_signal(event, NULL, SIGINT, NULL, NULL); - sd_event_add_signal(event, NULL, SIGTERM, NULL, NULL); + (void) sd_event_add_signal(event, NULL, SIGINT, NULL, NULL); + (void) sd_event_add_signal(event, NULL, SIGTERM, NULL, NULL); if (!arg_quiet) log_info("Running as unit %s.\nPress ^] three times within 1s to disconnect TTY.", service); |