From a3cdeecf0033919e3b5a79c17c19b5ac98719256 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 20 Jul 2015 20:20:54 +0000 Subject: - Add timeout-finish support and "down-readiness" - LOTS of refactoring to make this work - Remove s6-notifywhenup - s6-supervise now rocks the casbah - rc for 2.2.0.0 --- src/include/s6/s6-supervise.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/include') diff --git a/src/include/s6/s6-supervise.h b/src/include/s6/s6-supervise.h index 2e9a3fa..dec0455 100644 --- a/src/include/s6/s6-supervise.h +++ b/src/include/s6/s6-supervise.h @@ -3,39 +3,44 @@ #ifndef S6_SUPERVISE_H #define S6_SUPERVISE_H +#include #include #define S6_SUPERVISE_CTLDIR "supervise" #define S6_SUPERVISE_EVENTDIR "event" #define S6_SVSCAN_CTLDIR ".s6-svscan" #define S6_SVSTATUS_FILENAME S6_SUPERVISE_CTLDIR "/status" -#define S6_SUPERVISE_READY_FILENAME S6_SUPERVISE_CTLDIR "/ready" -#define S6_SVSTATUS_SIZE 26 +#define S6_SVSTATUS_SIZE 35 extern int s6_svc_write (char const *, char const *, unsigned int) ; +extern int s6_svc_writectl (char const *, char const *, char const *, unsigned int) ; extern int s6_svc_main (int, char const *const *, char const *, char const *, char const *) ; typedef struct s6_svstatus_s s6_svstatus_t, *s6_svstatus_t_ref ; struct s6_svstatus_s { tain_t stamp ; - unsigned int pid ; - unsigned int flagwant : 1 ; - unsigned int flagwantup : 1 ; + tain_t readystamp ; + pid_t pid ; + int wstat ; unsigned int flagpaused : 1 ; unsigned int flagfinishing : 1 ; - unsigned int wstat ; + unsigned int flagwant : 1 ; + unsigned int flagwantup : 1 ; + unsigned int flagready : 1 ; } ; #define S6_SVSTATUS_ZERO \ { \ .stamp = TAIN_ZERO, \ + .readystamp = TAIN_ZERO, \ .pid = 0, \ - .flagwant = 0, \ - .flagwantup = 0, \ + .wstat = 0, \ .flagpaused = 0, \ .flagfinishing = 0, \ - .wstat = 0 \ + .flagwant = 1, \ + .flagwantup = 1, \ + .flagready = 1 \ } extern void s6_svstatus_pack (char *, s6_svstatus_t const *) ; -- cgit v1.3.1