diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-07-10 17:14:17 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-07-12 08:26:15 +0200 |
commit | 0bd721763436e6b156eebcf94492525631801668 (patch) | |
tree | f54aeb8340199518c0ad2088d113b2eeb491a016 /src/tty-ask-password-agent | |
parent | manager: move is-system check into manager_enable_special_signals() (diff) | |
download | systemd-0bd721763436e6b156eebcf94492525631801668.tar.xz systemd-0bd721763436e6b156eebcf94492525631801668.zip |
signal-util: use common definitions for ignore + default "struct sigaction"
We use this at various places, let's unify this in one global constant.
This changes flags in crash-handler.c in a tiny irrelevant way: we ask
syscalls to be continued on signal arrival, which we previously didn't.
But that shouldn't change anything, the only thing we'll do in the
relevant process is call raise(), and that's it, hence there definitely
are no syscalls to restart or not to restart.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r-- | src/tty-ask-password-agent/tty-ask-password-agent.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 31b284b502..84ce5e1940 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -548,14 +548,10 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char **arguments .sa_handler = nop_signal_handler, .sa_flags = SA_NOCLDSTOP | SA_RESTART, }; - static const struct sigaction sighup = { - .sa_handler = SIG_DFL, - .sa_flags = SA_RESTART, - }; int r; assert_se(sigaction(SIGCHLD, &sigchld, NULL) >= 0); - assert_se(sigaction(SIGHUP, &sighup, NULL) >= 0); + assert_se(sigaction(SIGHUP, &sigaction_default, NULL) >= 0); assert_se(sigprocmask_many(SIG_UNBLOCK, NULL, SIGHUP, SIGCHLD) >= 0); r = safe_fork("(sd-passwd)", FORK_RESET_SIGNALS|FORK_LOG, ret_pid); |