pub unsafe extern "C" fn svn_io_start_cmd3(
cmd_proc: *mut apr_proc_t,
path: *const c_char,
cmd: *const c_char,
args: *const *const c_char,
env: *const *const c_char,
inherit: svn_boolean_t,
infile_pipe: svn_boolean_t,
infile: *mut apr_file_t,
outfile_pipe: svn_boolean_t,
outfile: *mut apr_file_t,
errfile_pipe: svn_boolean_t,
errfile: *mut apr_file_t,
pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Start @a cmd with @a args, using utf8-encoded @a path as working directory. Return the process handle for the invoked program in @a *cmd_proc.
If @a infile_pipe is TRUE, connect @a cmd’s stdin to a pipe; otherwise, connect it to @a infile (which may be NULL). If @a outfile_pipe is TRUE, connect @a cmd’s stdout to a pipe; otherwise, connect it to @a outfile (which may be NULL). If @a errfile_pipe is TRUE, connect @a cmd’s stderr to a pipe; otherwise, connect it to @a errfile (which may be NULL). (Callers must pass FALSE for each of these boolean values for which the corresponding file handle is non-NULL.)
@a args is a list of utf8-encoded const char * arguments, terminated by @c NULL. @a args[0] is the name of the program, though it need not be the same as @a cmd.
If @a inherit is TRUE, the invoked program inherits its environment from the caller and @a cmd, if not absolute, is searched for in PATH.
If @a inherit is FALSE @a cmd must be an absolute path and the invoked program inherits the environment defined by @a env or runs with an empty environment in @a env is NULL.
@note On some platforms, failure to execute @a cmd in the child process will result in error output being written to @a errfile, if non-NULL, and a non-zero exit status being returned to the parent process.
@note An APR bug affects Windows: passing a NULL @a env does not guarantee the invoked program to run with an empty environment when @a inherit is FALSE, the program may inherit its parent’s environment. Explicitly pass an empty @a env to get an empty environment.
@since New in 1.8.