summaryrefslogtreecommitdiff
path: root/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-13 04:51:38 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-13 04:51:38 +0200
commit9ea9a0c85c427397e1f1f4bb1f4d3192aab5987e (patch)
treee73bee020b5b21c0eb8d22a19677198e213286f4 /service.c
parent7b683879838523032604a2a5a95142956f7b8a88 (diff)
unit: allow state change from running to restarting
Diffstat (limited to 'service.c')
-rw-r--r--service.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/service.c b/service.c
index 21e8436661..ddf03bbf12 100644
--- a/service.c
+++ b/service.c
@@ -1461,11 +1461,12 @@ static void service_enter_restart(Service *s) {
int r;
assert(s);
+ service_enter_dead(s, true, false);
+
if ((r = manager_add_job(UNIT(s)->meta.manager, JOB_START, UNIT(s), JOB_FAIL, false, NULL)) < 0)
goto fail;
log_debug("%s scheduled restart job.", unit_id(UNIT(s)));
- service_enter_dead(s, true, false);
return;
fail: