]> git.ozlabs.org Git - ccan/blobdiff - ccan/pipecmd/pipecmd.h
pipecmd: reverse order of args to match documentation; add pipecmd_preserve.
[ccan] / ccan / pipecmd / pipecmd.h
index 4816950502f2c949183ea72fcaacb60976a995cb..5bbaefc01234699e23ab719d2495161f9ae1b935 100644 (file)
@@ -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 @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.
  */
  *
  * 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);
  * @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 */
 #endif /* CCAN_PIPECMD_H */