mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
Do a full restart rather than HUP if command line of a service has changed
By keeping track of when a full restart is needed, Finit can relieve the user of having to track modifications to service configuration. This also makes initctl reload easier to explain and reason about as the effect of a reload should now be that any configuration updates to services will be fully "commited" by initctl reload. Signed-off-by: Jacques de Laval <Jacques.De.Laval@westermo.com>
This commit is contained in:
1 parent
665d212bd6
commit
10f4c7fa18
4 files changed
+34
-11
No files matched your search
@@ -142,6 +142,7 @@ typedef struct svc {
|
||||
/* Command, arguments and service description */
|
||||
char cmd[MAX_ARG_LEN];
|
||||
char args[MAX_NUM_SVC_ARGS][MAX_ARG_LEN];
|
||||
int args_dirty;
|
||||
char desc[MAX_STR_LEN];
|
||||
char env[MAX_ARG_LEN];
|
||||
|
||||
@@ -194,7 +195,7 @@ static inline int svc_is_runtask (svc_t *svc) { return svc && (SVC_TYPE_RUNTAS
|
||||
static inline int svc_is_forking (svc_t *svc) { return (svc_is_daemon(svc) || svc_is_sysv(svc)) && svc->pidfile[0] == '!'; }
|
||||
|
||||
static inline int svc_in_runlevel (svc_t *svc, int runlevel) { return svc && ISSET(svc->runlevels, runlevel); }
|
||||
static inline int svc_has_sighup (svc_t *svc) { return svc && 0 != svc->sighup; }
|
||||
static inline int svc_nohup (svc_t *svc) { return svc && (0 == svc->sighup || 0 != svc->args_dirty); }
|
||||
static inline int svc_has_pidfile (svc_t *svc) { return svc_is_daemon(svc) && svc->pidfile[0] != 0 && svc->pidfile[0] != '!'; }
|
||||
|
||||
static inline void svc_starting (svc_t *svc) { if (svc) svc->starting = 1; }
|
||||
|
||||
Reference in new issue
Block a user