blob: d88724743212643b0b78c4d9d89d171ac9e53e87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* ISC license. */
#include <skalibs/djbunix.h>
#include <skalibs/webipc.h>
#include <skalibs/unixconnection.h>
#include <s6/s6-fdholder.h>
int s6_fdholder_start (s6_fdholder_t *a, char const *path, tain_t const *deadline, tain_t *stamp)
{
int fd = ipc_stream_nb() ;
if (fd < 0) return 0 ;
if (!ipc_timed_connect(fd, path, deadline, stamp))
{
fd_close(fd) ;
return 0 ;
}
unixconnection_init(&a->connection, fd, fd) ;
return 1 ;
}
|