mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Dependents not restarted after SIGHUP reload of service
When 'initctl reload' is called after marking a service in a dependency chain dirty, Finit fails to restart (unfreeze) affected services. This patch updates the pidfile plugin to watch for IN_ATTRIB changes, e.g. when a process uses utimensat() to update its pidfile, and adds service_step_all() at end of reload cycle to guarantee convergence after conditions are reasserted. Issue #476 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+104
-33
No files matched your search
+2
-1
@@ -59,7 +59,7 @@ static int pidfile_add_path(struct iwatch *iw, char *path)
|
||||
}
|
||||
}
|
||||
|
||||
return iwatch_add(iw, path, IN_ONLYDIR | IN_CLOSE_WRITE);
|
||||
return iwatch_add(iw, path, IN_ONLYDIR | IN_CLOSE_WRITE | IN_ATTRIB);
|
||||
}
|
||||
|
||||
static void pidfile_update_conds(char *dir, char *name, uint32_t mask)
|
||||
@@ -276,6 +276,7 @@ static void pidfile_reconf(void *arg)
|
||||
if (cond_get(cond) == COND_ON)
|
||||
continue;
|
||||
|
||||
dbg("Reassert condition %s", cond);
|
||||
cond_set_path(cond_path(cond), COND_ON);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user