mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
initctl: new command 'reload NAME:ID' and new semantics for restart
This patch corrects a logical glitch, or design flaw, in initctl. The 'restart FOO' command did not stop+start FOO only send SIGHUP (provided FOO supports SIGHUP). Hence, a new command 'reload FOO' is introduced, which does exactly that, and 'restart FOO' now stops and restarts FOO. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
a56220f158
commit
90f7ff1c23
3 files changed
+40
-11
No files matched your search
@@ -201,6 +201,7 @@ static inline int svc_has_pidfile (svc_t *svc) { return svc_is_daemon(svc) && s
|
||||
static inline void svc_starting (svc_t *svc) { if (svc) svc->starting = 1; }
|
||||
static inline void svc_started (svc_t *svc) { if (svc) svc->starting = 0; }
|
||||
static inline int svc_is_starting (svc_t *svc) { return svc && 0 != svc->starting; }
|
||||
static inline int svc_is_running (svc_t *svc) { return svc && svc->state == SVC_RUNNING_STATE; }
|
||||
|
||||
static inline int svc_is_removed (svc_t *svc) { return svc && svc->removed; }
|
||||
static inline int svc_is_changed (svc_t *svc) { return svc && 0 != svc->dirty; }
|
||||
|
||||
Reference in new issue
Block a user