Only show [ OK ] startup/status if run tasks exit normally

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2020-02-05 07:52:36 +01:00
parent c3eca9fe8f
commit 912a336997
+4 -1
View File
@@ -376,7 +376,10 @@ static int service_start(svc_t *svc)
switch (svc->type) {
case SVC_TYPE_RUN:
svc->status = complete(svc->cmd, pid);
result = WEXITSTATUS(svc->status);
if (WIFEXITED(svc->status) && !WEXITSTATUS(svc->status))
result = 0;
else
result = 1;
svc->start_time = svc->pid = 0;
svc->once++;
svc_set_state(svc, SVC_STOPPING_STATE);