|
Zbigniew Jędrzejewski-Szmek |
5d6eed |
From 4392ebaa516ef068809bb7f3d8a58b68f2face4f Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
From: Waldemar Brodkorb <wbx-github@users.noreply.github.com>
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Date: Fri, 25 Nov 2016 11:24:58 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Subject: [PATCH] fix journald startup problem when code is compiled with
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
-DNDEBUG (#4735)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Similar to this patch from here:
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
http://systemd-devel.freedesktop.narkive.com/AvfCbi6c/patch-0-3-using-assert-se-on-actions-with-side-effects-on-test-cases
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
If the code is compiled with -DNDEBUG which is the default for
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
some embedded buildsystems, systemd-journald does not startup
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
and silently fails.
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
(cherry picked from commit 9bab3b65b0ad625ebbf50583c46f5c7c35b18a70)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
---
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
src/journal/journald-server.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
index 908c7b8eeb..c0987625cd 100644
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
--- a/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
+++ b/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
@@ -1480,7 +1480,7 @@ static int setup_signals(Server *s) {
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
assert(s);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
- assert(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
+ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
if (r < 0)
|