From ce6f2000cee65d8cf3875a746815b725d4597c62 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 4 Dec 2020 22:35:08 +0000 Subject: Add s6_supervise_link and s6_supervise_unlink for future s6-rc change --- src/include/s6/s6-supervise.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/s6/s6-supervise.h b/src/include/s6/s6-supervise.h index 187bc20..77280e7 100644 --- a/src/include/s6/s6-supervise.h +++ b/src/include/s6/s6-supervise.h @@ -3,7 +3,9 @@ #ifndef S6_SUPERVISE_H #define S6_SUPERVISE_H +#include #include + #include #define S6_SUPERVISE_CTLDIR "supervise" @@ -19,9 +21,6 @@ extern int s6_svc_write (char const *, char const *, size_t) ; extern int s6_svc_writectl (char const *, char const *, char const *, size_t) ; extern int s6_svc_main (int, char const *const *, char const *, char const *, char const *) ; -extern int s6_svc_lock_take (char const *) ; -extern void s6_svc_lock_release(int) ; - typedef struct s6_svstatus_s s6_svstatus_t, *s6_svstatus_t_ref ; struct s6_svstatus_s { @@ -56,9 +55,9 @@ extern void s6_svstatus_unpack (char const *, s6_svstatus_t *) ; extern int s6_svstatus_read (char const *, s6_svstatus_t *) ; extern int s6_svstatus_write (char const *, s6_svstatus_t const *) ; -/* These functions leak a fd, that's intended */ -extern int s6_supervise_lock (char const *) ; -extern int s6_supervise_lock_mode (char const *, unsigned int, unsigned int) ; +extern int s6_supervise_link (char const *, char const *const *, size_t, char const *, uint32_t, tain_t const *, tain_t *) ; +#define s6_supervise_link_g(scandir, servicedirs, n, prefix, options, deadline) s6_supervise_link(scandir, servicedirs, n, prefix, options, (deadline), &STAMP) +extern void s6_supervise_unlink (char const *, char const *, uint32_t) ; typedef struct s6_dtally_s s6_dtally_t, *s6_dtally_ref ; struct s6_dtally_s -- cgit v1.2.3