diff options
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 ; +} |