with_create_args specifies the arguments used to create a child process.
create ~prog ~args ?working_dir ?env () uses
exec to create a child
process that runs the executable
args as arguments. It creates pipes to
communicate with the child process's
args should not include
prog as the first argument.
working_dir is supplied, then the child process will
chdir() there before
env specifies the environment of the child process.
Error if it is unable to create the child process. This can happen
in any number of situations (unable to fork, unable to create the pipes, unable to cd
working_dir, unable to exec, etc.).
stdin tand then begins collecting the output produced on
stderr, continuing to collect output until
tterminates and the pipes for
creates a process and
waits for it to complete. If the process exits with
an acceptable status, then
run returns its stdout. Acceptable statuses are zero,
and any nonzero values specified in
accept_nonzero_exit. If the process exits
run returns an error indicating what went wrong that includes
stdout and stderr.
Some care is taken so that an error displays nicely as a sexp---in particular, if the child's output can already be parsed as a sexp, then it will display as a sexp (rather than a sexp embedded in a string). Also, if the output isn't a sexp, it will be split on newlines into a list of strings, so that it displays on multiple lines rather than a single giant line with embedded " "'s.
collect_stdout_lines_and_wait are like
run_lines but work from an existing process instead of creating a new one.