X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fpipecmd%2Fpipecmd.h;h=5bbaefc01234699e23ab719d2495161f9ae1b935;hb=8cc0749a0e067582f1100e6ee1cd975af52e372a;hp=4816950502f2c949183ea72fcaacb60976a995cb;hpb=97a1ba3d6fac93e680e3d95cef930dea4fdd0822;p=ccan 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 */