pub async fn start_external_utility_in_subshell_and_wait(
env: &mut Env,
path: CString,
fields: Vec<Field>,
) -> Result<ExitStatus>
Expand description
Starts an external utility in a subshell and waits for it to finish.
path
is the path to the external utility. fields
are the command line
words of the utility. The first field must exist and be the name of the
utility as it is used for error messages.
This function starts the utility in a subshell and waits for it to finish. The subshell is a foreground job if job control is enabled.
This function returns the exit status of the utility. In case of an error, it prints an error message to the standard error before returning an appropriate exit status.