[systemd-devel] [PATCH ping?] service: schedule JOB_RESTART from SERVICE_AUTO_RESTART state

David Ward david.ward at ll.mit.edu
Mon Mar 19 06:42:25 PDT 2012


Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45511
---
 src/service.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/service.c b/src/service.c
index 8b5c0b0..e39e23d 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2208,9 +2208,7 @@ static void service_enter_restart(Service *s) {
                         goto fail;
         }
 
-        service_enter_dead(s, SERVICE_SUCCESS, false);
-
-        if ((r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT(s), JOB_FAIL, false, &error, NULL)) < 0)
+        if ((r = manager_add_job(UNIT(s)->manager, JOB_RESTART, UNIT(s), JOB_FAIL, false, &error, NULL)) < 0)
                 goto fail;
 
         log_debug("%s scheduled restart job.", UNIT(s)->id);
-- 
1.7.4.1



More information about the systemd-devel mailing list