summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/s6/s6-supervise.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/include/s6/s6-supervise.h b/src/include/s6/s6-supervise.h
index bbd8539..187bc20 100644
--- a/src/include/s6/s6-supervise.h
+++ b/src/include/s6/s6-supervise.h
@@ -11,6 +11,8 @@
#define S6_SVSCAN_CTLDIR ".s6-svscan"
#define S6_SVSTATUS_FILENAME S6_SUPERVISE_CTLDIR "/status"
#define S6_SVSTATUS_SIZE 35
+#define S6_DTALLY_FILENAME S6_SUPERVISE_CTLDIR "/death_tally"
+#define S6_MAX_DEATH_TALLY 4096
extern int s6_svc_ok (char const *) ;
extern int s6_svc_write (char const *, char const *, size_t) ;
@@ -32,6 +34,7 @@ struct s6_svstatus_s
unsigned int flagwant : 1 ; /* unused */
unsigned int flagwantup : 1 ;
unsigned int flagready : 1 ;
+ unsigned int flagthrottled : 1 ;
} ;
#define S6_SVSTATUS_ZERO \
@@ -44,7 +47,8 @@ struct s6_svstatus_s
.flagfinishing = 0, \
.flagwant = 1, \
.flagwantup = 1, \
- .flagready = 1 \
+ .flagready = 1, \
+ .flagthrottled = 0 \
}
extern void s6_svstatus_pack (char *, s6_svstatus_t const *) ;
@@ -56,4 +60,20 @@ extern int s6_svstatus_write (char const *, s6_svstatus_t const *) ;
extern int s6_supervise_lock (char const *) ;
extern int s6_supervise_lock_mode (char const *, unsigned int, unsigned int) ;
+typedef struct s6_dtally_s s6_dtally_t, *s6_dtally_ref ;
+struct s6_dtally_s
+{
+ tain_t stamp ;
+ unsigned char exitcode ;
+ unsigned char sig ;
+} ;
+#define S6_DTALLY_ZERO { .stamp = TAIN_ZERO, .exitcode = 0, .sig = 0 }
+
+#define S6_DTALLY_PACK (TAIN_PACK + 2)
+
+extern void s6_dtally_pack (char *, s6_dtally_t const *) ;
+extern void s6_dtally_unpack (char const *, s6_dtally_t *) ;
+extern ssize_t s6_dtally_read (char const *, s6_dtally_t *, size_t) ;
+extern int s6_dtally_write (char const *, s6_dtally_t const *, size_t) ;
+
#endif