core: never propagate reload failure to service result
authorLennart Poettering <lennart@poettering.net>
Wed, 17 Jul 2019 17:16:33 +0000 (19:16 +0200)
committerMichael Biebl <biebl@debian.org>
Wed, 16 Oct 2019 13:24:54 +0000 (14:24 +0100)
Fixes: #11238
(cherry picked from commit d611cfa748aaf600832160132774074e808c82c7)

Gbp-Pq: Name core-never-propagate-reload-failure-to-service-result.patch

src/core/service.c

index 324dcf2311081f3c6023ea35207aa3f97c259f84..5f5bcb33ba0e3fc526c26f4d109c54f9b9c0ff30 100644 (file)
@@ -3335,7 +3335,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                                 service_exec_command_to_string(s->control_command_id),
                                 code, status);
 
-                if (s->result == SERVICE_SUCCESS)
+                if (s->state != SERVICE_RELOAD && s->result == SERVICE_SUCCESS)
                         s->result = f;
 
                 if (s->control_command &&