From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- src/libunixonacid/skaclient_startf.c | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/libunixonacid/skaclient_startf.c (limited to 'src/libunixonacid/skaclient_startf.c') diff --git a/src/libunixonacid/skaclient_startf.c b/src/libunixonacid/skaclient_startf.c new file mode 100644 index 0000000..aa36323 --- /dev/null +++ b/src/libunixonacid/skaclient_startf.c @@ -0,0 +1,46 @@ +/* ISC license. */ + +#include +#include +#include +#include +#include "skaclient-internal.h" + +int skaclient_startf ( + skaclient_t *a, + char *bufss, + unsigned int bufsn, + char *auxbufss, + unsigned int auxbufsn, + char *bufas, + unsigned int bufan, + char *auxbufas, + unsigned int auxbufan, + kolbak_closure_t *q, + unsigned int qlen, + char const *prog, + char const *const *argv, + char const *const *envp, + uint32 options, + char const *before, + unsigned int beforelen, + char const *after, + unsigned int afterlen, + tain_t const *deadline, + tain_t *stamp) +{ + skaclient_cbdata_t blah ; + unixmessage_t m ; + register int r ; + if (!skaclient_startf_async(a, bufss, bufsn, auxbufss, auxbufsn, bufas, bufan, auxbufas, auxbufan, q, qlen, prog, argv, envp, options, before, beforelen, after, afterlen, &blah)) return 0 ; + r = unixmessage_timed_receive(&a->syncin, &m, deadline, stamp) ; + if (r < 1) + { + int e = errno ; + if (!r) e = EPIPE ; + skaclient_end(a) ; + errno = e ; + return 0 ; + } + return kolbak_call(&m, &a->kq) ; +} -- cgit v1.3.1