1 /* CC0 license (public domain) - see LICENSE file for details */
10 * pipecmd - run a command, optionally connect pipes.
11 * @infd: input fd to write to child (if non-NULL)
12 * @outfd: output fd to read from child (if non-NULL)
13 * @cmd...: NULL-terminate list of command and arguments.
15 * If @infd is NULL, the child's input is (read-only) /dev/null.
16 * If @outfd is NULL, the child's output is (write-only) /dev/null.
18 * The return value is the pid of the child, or -1.
20 pid_t pipecmd(int *infd, int *outfd, const char *cmd, ...);
23 * pipecmdv - run a command, optionally connect pipes (stdarg version)
24 * @infd: input fd to write to child (if non-NULL)
25 * @outfd: output fd to read from child (if non-NULL)
26 * @cmd: command to run.
27 * @ap: argument list for arguments.
29 pid_t pipecmdv(int *infd, int *outfd, const char *cmd, va_list ap);
30 #endif /* CCAN_PIPECMD_H */