dcavalca / rpms / systemd

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