diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-03-02 09:41:24 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-03-02 09:41:24 +0000 |
commit | 23fba266a9454ee6ca095b7f6eccf523f6526607 (patch) | |
tree | 7350fdaba49b1529a13d50f6396aea35f340954d /src/lib | |
parent | 54d0dc0990f13a86680fa55c623f0570853749ac (diff) | |
download | s6-linux-init-23fba266a9454ee6ca095b7f6eccf523f6526607.tar.xz |
Save pending changes in 1.0.0.0 branch
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/deps-lib/s6_linux_init | 4 | ||||
-rw-r--r-- | src/lib/s6_linux_init_logouthook.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/deps-lib/s6_linux_init b/src/lib/deps-lib/s6_linux_init new file mode 100644 index 0000000..4c849c7 --- /dev/null +++ b/src/lib/deps-lib/s6_linux_init @@ -0,0 +1,4 @@ +s6_linux_init_logouthook.o +-lskarnet +${SOCKET_LIB} +${TAINNOW_LIB} diff --git a/src/lib/s6_linux_init_logouthook.c b/src/lib/s6_linux_init_logouthook.c new file mode 100644 index 0000000..215365d --- /dev/null +++ b/src/lib/s6_linux_init_logouthook.c @@ -0,0 +1,18 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/webipc.h> + +#include "initctl.h" + +int s6_linux_init_logouthook (void) +{ + int fd = ipc_stream_nbcoe() ; + if (fd < 0) return -1 ; + if (!ipc_timed_connect(fd, LOGOUTHOOKD_PATH, 0, 0)) + { + fd_close(fd) ; + return -1 ; + } + return fd ; +} |