mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Refactor, change from static array of svc_t to linked list
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d7401b2a96
commit
0f1f51b5ad
7 files changed
+103
-164
No files matched your search
+1
-2
@@ -95,14 +95,13 @@ 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_iterator1(&pos, 1); svc; svc = svc_iterator1(&pos, 0)) {
|
||||
for (svc = svc_iterator(NULL); svc; svc = svc_iterator(svc)) {
|
||||
mkcond(cond, sizeof(cond), svc->cmd);
|
||||
if (svc->state == SVC_RUNNING_STATE &&
|
||||
!svc_is_changed(svc) &&
|
||||
|
||||
Reference in new issue
Block a user