X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fpipecmd%2Fpipecmd.h;h=5bbaefc01234699e23ab719d2495161f9ae1b935;hp=4816950502f2c949183ea72fcaacb60976a995cb;hb=d3d2242ba8d975f8d7ddaa0348953dfd6f45ffce;hpb=440efa555b08324386fa15488cefaed68a791d6e diff --git a/ccan/pipecmd/pipecmd.h b/ccan/pipecmd/pipecmd.h index 48169505..5bbaefc0 100644 --- a/ccan/pipecmd/pipecmd.h +++ b/ccan/pipecmd/pipecmd.h @@ -18,6 +18,7 @@ * If @errfd is NULL, the child's stderr is (write-only) /dev/null. * * If @errfd == @outfd (and non-NULL) they will be shared. + * If @infd, @outfd or @errfd is &pipecmd_preserve, it is unchanged. * * The return value is the pid of the child, or -1. */ @@ -41,4 +42,10 @@ pid_t pipecmdv(int *infd, int *outfd, int *errfd, const char *cmd, va_list ap); * @arr: NULL-terminated array for arguments (first is program to run). */ pid_t pipecmdarr(int *infd, int *outfd, int *errfd, char *const *arr); + +/** + * pipecmd_preserve - special value for fds to indicate it is unchanged + */ +extern int pipecmd_preserve; + #endif /* CCAN_PIPECMD_H */