ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Brian Stinson 2593d8
From cffe5d0e781f6fa7f2275b94d2dcc26e00859a78 Mon Sep 17 00:00:00 2001
Brian Stinson 2593d8
From: Lennart Poettering <lennart@poettering.net>
Brian Stinson 2593d8
Date: Wed, 17 Jul 2019 19:16:33 +0200
Brian Stinson 2593d8
Subject: [PATCH] core: never propagate reload failure to service result
Brian Stinson 2593d8
Brian Stinson 2593d8
Fixes: #11238
Brian Stinson 2593d8
(cherry picked from commit d611cfa748aaf600832160132774074e808c82c7)
Brian Stinson 2593d8
Brian Stinson 2593d8
Resolves: #1735787
Brian Stinson 2593d8
---
Brian Stinson 2593d8
 src/core/service.c | 2 +-
Brian Stinson 2593d8
 1 file changed, 1 insertion(+), 1 deletion(-)
Brian Stinson 2593d8
Brian Stinson 2593d8
diff --git a/src/core/service.c b/src/core/service.c
Brian Stinson 2593d8
index 8342c131c8..24f167572a 100644
Brian Stinson 2593d8
--- a/src/core/service.c
Brian Stinson 2593d8
+++ b/src/core/service.c
Brian Stinson 2593d8
@@ -3310,7 +3310,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
Brian Stinson 2593d8
                               "Control process exited, code=%s status=%i",
Brian Stinson 2593d8
                               sigchld_code_to_string(code), status);
Brian Stinson 2593d8
 
Brian Stinson 2593d8
-                if (s->result == SERVICE_SUCCESS)
Brian Stinson 2593d8
+                if (s->state != SERVICE_RELOAD && s->result == SERVICE_SUCCESS)
Brian Stinson 2593d8
                         s->result = f;
Brian Stinson 2593d8
 
Brian Stinson 2593d8
                 if (s->control_command &&