From 5f76ed9108c5c48850cf339096527c4d53f0bc12 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Dec 2014 19:06:06 +0000 Subject: Separate socket from pipe in child_spawn. Less code in skaclient! --- src/include/skalibs/djbunix.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/include') diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h index b5f5db4..1a54db6 100644 --- a/src/include/skalibs/djbunix.h +++ b/src/include/skalibs/djbunix.h @@ -129,18 +129,18 @@ extern int rmstar (char const *) ; extern int rmstar_tmp (char const *, stralloc *) ; - /* Simple spawn functions. 0 for no communication, 1 for a child/parent pipe. */ + /* Simple spawn functions with 0 or 1 communicating fds. */ extern pid_t child_spawn0 (char const *, char const *const *, char const *const *) ; -extern pid_t child_spawn1 (char const *, char const *const *, char const *const *, int *, int) ; +extern pid_t child_spawn1_pipe (char const *, char const *const *, char const *const *, int *, int) ; +extern pid_t child_spawn1_socket (char const *, char const *const *, char const *const *, int *) ; /* Unified function to fork a child with communication canals. * uses posix_spawn() if available, else uses fork+exec * requests n (the last arg) communication fds between parent and child - * if n=1, the fd is a Unix socket. If more canals are needed, you can - pass them through that socket. + * if n=1, equivalent to child_spawn1_pipe; child writes, parent reads. * if n>=2, the fds are pipes, parent reads on even and writes on odd. */ -- cgit v1.3.1