mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Reassert condition when svc_t goes from WAITING --> RUNNING
Reassert condition when an unchanged/unmodified process goes from WAITING state to RUNNING. I.e. it had a condition that went to flux during `initctl reload`, which drove it to WAITING and was then sent SIGSTOP during reconf. Also, on condition update, loop through all services until no more state changes are observed. This allows long dependency chains of services to resolve and actually go back to RUNNING state as intended whenever any condition changes at runtime. Signed-off-by: Jonas Johansson <jonasj76@gmail.com> Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
committed by
Joachim Nilsson
parent
cb9f6213dc
commit
dddd45e3b5
@@ -37,12 +37,6 @@ struct context {
|
||||
int wd;
|
||||
};
|
||||
|
||||
static char *mkcond(char *buf, size_t len, char *nm)
|
||||
{
|
||||
snprintf(buf, len, "svc%s%s", nm[0] != '/' ? "/" : "", nm);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void pidfile_callback(void *arg, int fd, int events)
|
||||
{
|
||||
static char ev_buf[8 *(sizeof(struct inotify_event) + NAME_MAX + 1) + 1];
|
||||
|
||||
Reference in New Issue
Block a user