From: Zbigniew Jędrzejewski-Szmek Date: Sat, 9 Apr 2016 01:09:17 +0000 (-0400) Subject: core/service: only search for pid if loading from file failed X-Git-Tag: v230~194^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2996%2Fhead;p=thirdparty%2Fsystemd.git core/service: only search for pid if loading from file failed CID #1237511. --- diff --git a/src/core/service.c b/src/core/service.c index 8f59c411b8b..c5cbf0f1529 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2751,10 +2751,9 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { break; case SERVICE_RELOAD: - if (f == SERVICE_SUCCESS) { - service_load_pid_file(s, true); - service_search_main_pid(s); - } + if (f == SERVICE_SUCCESS) + if (service_load_pid_file(s, true) < 0) + service_search_main_pid(s); s->reload_result = f; service_enter_running(s, SERVICE_SUCCESS);