diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-08 21:09:17 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-08 21:09:17 -0400 |
commit | 7236ce6e9e379948217c31f38b48de6448521162 (patch) | |
tree | f1b0c807ece615292e58923cfad0cf93b7a6c938 /src | |
parent | 783e05d637540f36cb9b7e08d137ddd9d110c98f (diff) |
core/service: only search for pid if loading from file failed
CID #1237511.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/service.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c index 8f59c411b8..c5cbf0f152 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); |