65typedef struct xtc_osproc xtc_osproc_t;
67typedef struct xtc_osproc_opts {
77 int (*fn)(
int ctrl_fd,
void *arg);
95long xtc_osproc_pid(
const xtc_osproc_t *p);
101int xtc_osproc_ctrl_fd(
const xtc_osproc_t *p);
106int xtc_osproc_signal(
const xtc_osproc_t *p,
int sig);
112int xtc_osproc_try_wait(xtc_osproc_t *p,
int *status);
120int xtc_osproc_wait(xtc_osproc_t *p,
int *status, int64_t timeout_ns);
127void xtc_osproc_destroy(xtc_osproc_t *p);
145int xtc_osproc_isolated_spawn(
const char *name,
146 int (*fn)(
int ctrl_fd,
void *arg),
void *arg,
156int xtc_osproc_call(xtc_osproc_t *p,
const void *req,
size_t req_len,
157 void **reply,
size_t *reply_len,
size_t max_reply,
164typedef int (*xtc_osproc_handler_fn)(
const void *req,
size_t req_len,
165 void **reply,
size_t *reply_len,
174int xtc_osproc_serve(
int ctrl_fd, xtc_osproc_handler_fn handler,
void *arg);