mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
Add 'notify:pid' style readiness notifaction and 'readiness none'
This change expands the readiness notification system in Finit with the
native 'pid' style, which will remain the default readiness in Finit 4.x
For systems that want to transition to Finit 5.x early, a global option
to set 'readiness none' in /etc/finit.conf, has been added. This change
the service default notification mode to 'notify:none', which can also
be set by Finit 4.x ('readiness pid') for select services.
Fixes #386.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
6443995fc9
commit
0b5c555c7f
10 files changed
+88
-50
No files matched your search
@@ -83,6 +83,14 @@ typedef enum {
|
||||
SVC_ONCRASH_SCRIPT,
|
||||
} svc_oncrash_action_t;
|
||||
|
||||
/* 0: none, 1: systemd, 2: s6 */
|
||||
typedef enum {
|
||||
SVC_NOTIFY_NONE = 0,
|
||||
SVC_NOTIFY_PID,
|
||||
SVC_NOTIFY_SYSTEMD,
|
||||
SVC_NOTIFY_S6,
|
||||
} svc_notify_t;
|
||||
|
||||
#define MAX_ID_LEN 16
|
||||
#define MAX_ARG_LEN 64
|
||||
#define MAX_CMD_LEN 256
|
||||
@@ -202,7 +210,7 @@ typedef struct svc {
|
||||
/*
|
||||
* Readiness notification socket: systemd, s6
|
||||
*/
|
||||
int notify; /* 0: none, 1: systemd, 2: s6 */
|
||||
svc_notify_t notify;
|
||||
uev_t notify_watcher; /* i/o watcher */
|
||||
|
||||
/* time at svc_del(), used by gc timer */
|
||||
|
||||
Reference in new issue
Block a user