dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 95bb77653fe45f8865bae23c46bd1b25f14a35dc Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx-github@users.noreply.github.com>
Date: Fri, 25 Nov 2016 11:24:58 +0100
Subject: [PATCH] fix journald startup problem when code is compiled with
 -DNDEBUG (#4735)

Similar to this patch from here:
http://systemd-devel.freedesktop.narkive.com/AvfCbi6c/patch-0-3-using-assert-se-on-actions-with-side-effects-on-test-cases

If the code is compiled with -DNDEBUG which is the default for
some embedded buildsystems, systemd-journald does not startup
and silently fails.
(cherry picked from commit 9bab3b65b0ad625ebbf50583c46f5c7c35b18a70)
---
 src/journal/journald-server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 908c7b8eeb..c0987625cd 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1480,7 +1480,7 @@ static int setup_signals(Server *s) {
 
         assert(s);
 
-        assert(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
+        assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
 
         r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s);
         if (r < 0)
-- 
2.9.3