diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-03 23:55:53 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-03 23:58:53 +0100 |
commit | 089b64d5f8418ffe257d07ce80077d8c6c68da15 (patch) | |
tree | 7671af30859697c02120f1c02e115b9b3356709b /src/core | |
parent | 739731cdace09ff179fdd75ae0714da0d81e384d (diff) |
core: move service_unwatch_control_pid() call into service_enter_running()
When we enter the running state we should forget about any control processes, in all cases, and not just when hit a
reload timeout...
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/service.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c index 4942fc425d..8bfb9fed4c 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1635,6 +1635,8 @@ static void service_enter_running(Service *s, ServiceResult f) { if (f != SERVICE_SUCCESS) s->result = f; + service_unwatch_control_pid(s); + if (service_good(s)) { /* If there are any queued up sd_notify() @@ -2887,8 +2889,7 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us break; case SERVICE_RELOAD: - log_unit_warning(UNIT(s), "Reload operation timed out. Stopping."); - service_unwatch_control_pid(s); + log_unit_warning(UNIT(s), "Reload operation timed out. Killing reload process."); service_kill_control_processes(s); s->reload_result = SERVICE_FAILURE_TIMEOUT; service_enter_running(s, SERVICE_SUCCESS); |