diff options
Diffstat (limited to 'src/utmps/utmps_start.c')
-rw-r--r-- | src/utmps/utmps_start.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utmps/utmps_start.c b/src/utmps/utmps_start.c new file mode 100644 index 0000000..095fd2c --- /dev/null +++ b/src/utmps/utmps_start.c @@ -0,0 +1,18 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/webipc.h> +#include <utmps/utmps.h> + +int utmps_start (utmps *a, char const *path, tain_t const *deadline, tain_t *stamp) +{ + int fd = ipc_stream_nbcoe() ; + if (fd < 0) return 0 ; + if (!ipc_timed_connect(fd, path, deadline, stamp)) + { + fd_close(fd) ; + return 0 ; + } + a->fd = fd ; + return 1 ; +} |