mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Refactor, use new re-entrant svc_iterator1() API
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+2
-1
@@ -95,13 +95,14 @@ static void pidfile_callback(void *arg, int fd, int events)
|
||||
static void pidfile_reconf(void *arg)
|
||||
{
|
||||
static char cond[MAX_COND_LEN];
|
||||
int pos;
|
||||
svc_t *svc;
|
||||
int restart = 0;
|
||||
|
||||
do {
|
||||
restart = 0;
|
||||
|
||||
for (svc = svc_iterator(1); svc; svc = svc_iterator(0)) {
|
||||
for (svc = svc_iterator1(&pos, 1); svc; svc = svc_iterator1(&pos, 0)) {
|
||||
mkcond(cond, sizeof(cond), svc->cmd);
|
||||
if (svc->state == SVC_RUNNING_STATE &&
|
||||
!svc_is_changed(svc) &&
|
||||
|
||||
Reference in New Issue
Block a user