mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07:00
Fix #351: clean run tasks to prevent endless restarts
When we've started a run task, regardless of its exit status, we must mark it as not dirty to prevent it from being endlessly restarted. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -829,6 +829,7 @@ static int service_start(svc_t *svc)
|
||||
}
|
||||
svc->start_time = svc->pid = 0;
|
||||
svc->once++;
|
||||
svc_mark_clean(svc); /* done, regardless of exit status */
|
||||
svc_set_state(svc, SVC_STOPPING_STATE);
|
||||
break;
|
||||
|
||||
@@ -2351,7 +2352,6 @@ restart:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Everything went fine, clean and set state */
|
||||
svc_mark_clean(svc);
|
||||
svc_set_state(svc, SVC_RUNNING_STATE);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user