diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-18 19:06:06 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-18 19:06:06 +0000 |
commit | 5f76ed9108c5c48850cf339096527c4d53f0bc12 (patch) | |
tree | 6ccf306c97ccea0021bfea2f70c3654501953b45 /src/include | |
parent | b19b3e0682d6e224c12b35308772114fe27372fe (diff) | |
download | skalibs-5f76ed9108c5c48850cf339096527c4d53f0bc12.tar.xz |
Separate socket from pipe in child_spawn. Less code in skaclient!
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/djbunix.h | 8 |
1 files changed, 4 insertions, 4 deletions
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. */ |