diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-11-21 15:55:08 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-11-21 17:58:33 +0100 |
commit | 7ec22d7d4b9694462d2c6f98eaccc887f42f9b94 (patch) | |
tree | 6eb2fb42c28e39151e3b137b326e7281f357572d /src/journal/bsod.c | |
parent | po: Translated using Weblate (Hebrew) (diff) | |
download | systemd-7ec22d7d4b9694462d2c6f98eaccc887f42f9b94.tar.xz systemd-7ec22d7d4b9694462d2c6f98eaccc887f42f9b94.zip |
bsod: install the signal handler only just before we need it
Otherwise we might get stuck in sd_journal_wait(), since it handles
EINTR internally.
Resolves: #30084
Diffstat (limited to 'src/journal/bsod.c')
-rw-r--r-- | src/journal/bsod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/journal/bsod.c b/src/journal/bsod.c index 516a47c719..a88cb66b81 100644 --- a/src/journal/bsod.c +++ b/src/journal/bsod.c @@ -285,7 +285,6 @@ static int run(int argc, char *argv[]) { log_parse_environment(); sigbus_install(); - assert_se(sigaction_many(&nop_sigaction, SIGTERM, SIGINT) >= 0); r = parse_argv(argc, argv); if (r <= 0) @@ -300,6 +299,8 @@ static int run(int argc, char *argv[]) { return 0; } + assert_se(sigaction_many(&nop_sigaction, SIGTERM, SIGINT) >= 0); + r = display_emergency_message_fullscreen((const char*) message); if (r < 0) return log_error_errno(r, "Failed to display emergency message on terminal: %m"); |