mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
Follow-up to 6cdcacf, fix minor regression, premature clear of pid
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-3
@@ -631,6 +631,9 @@ static void service_cleanup(svc_t *svc)
|
||||
if (remove(fn) && errno != ENOENT)
|
||||
logit(LOG_CRIT, "Failed removing service %s pidfile %s",
|
||||
basename(svc->cmd), fn);
|
||||
|
||||
/* No longer running, update books. */
|
||||
svc->start_time = svc->pid = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -679,9 +682,6 @@ static int service_stop(svc_t *svc)
|
||||
service_cleanup(svc);
|
||||
} else
|
||||
service_cleanup(svc);
|
||||
|
||||
/* No longer running, update books. */
|
||||
svc->start_time = svc->pid = 0;
|
||||
} else {
|
||||
char *args[] = { svc->cmd, "stop", NULL };
|
||||
pid_t pid;
|
||||
|
||||
Reference in New Issue
Block a user