diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-19 18:27:37 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-19 18:27:37 +0000 |
commit | 0375b2b32e4683c8f7bdf104038bedde77d9827b (patch) | |
tree | 06cefb50369709bbf22c0b61481a3a9c0853f136 /src | |
parent | 70249dc762f2d384b5eee37fa7470284751e5ba8 (diff) | |
download | s6-0375b2b32e4683c8f7bdf104038bedde77d9827b.tar.xz |
Fix fd leak in s6_svc_lock_release
Diffstat (limited to 'src')
-rw-r--r-- | src/include/s6/s6-supervise.h | 3 | ||||
-rw-r--r-- | src/libs6/deps-lib/s6 | 1 | ||||
-rw-r--r-- | src/libs6/s6_svc_lock_release.c | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/include/s6/s6-supervise.h b/src/include/s6/s6-supervise.h index 541c30d..bbd8539 100644 --- a/src/include/s6/s6-supervise.h +++ b/src/include/s6/s6-supervise.h @@ -5,7 +5,6 @@ #include <sys/types.h> #include <skalibs/tai.h> -#include <skalibs/djbunix.h> #define S6_SUPERVISE_CTLDIR "supervise" #define S6_SUPERVISE_EVENTDIR "event" @@ -19,7 +18,7 @@ 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 *) ; -#define s6_svc_lock_release(fdlock) lock_un(fdlock) +extern void s6_svc_lock_release(int) ; typedef struct s6_svstatus_s s6_svstatus_t, *s6_svstatus_t_ref ; struct s6_svstatus_s diff --git a/src/libs6/deps-lib/s6 b/src/libs6/deps-lib/s6 index 9cb4d93..a0da2c5 100644 --- a/src/libs6/deps-lib/s6 +++ b/src/libs6/deps-lib/s6 @@ -29,6 +29,7 @@ s6_accessrules_uidgid_fs.o s6_supervise_lock.o s6_supervise_lock_mode.o s6_svc_lock_take.o +s6_svc_lock_release.o s6_svc_ok.o s6_svc_write.o s6_svc_writectl.o diff --git a/src/libs6/s6_svc_lock_release.c b/src/libs6/s6_svc_lock_release.c new file mode 100644 index 0000000..4a6f68d --- /dev/null +++ b/src/libs6/s6_svc_lock_release.c @@ -0,0 +1,8 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> + +void s6_svc_lock_release (int fd) +{ + fd_close(fd) ; +} |