runCommandWithOutput

fnCommandResult runCommandWithOutput(string[] args)

Execute an external command and capture stdout and stderr.

The child's standard error is redirected into its standard output, so both streams are combined (in arrival order) into the output field. This avoids pipe deadlocks because only a single pipe needs draining.

Parameters

argsArray of command arguments, where args[0] is the program name.

Returns

CommandResult containing exit status and the combined stdout+stderr

in the output field. The error field is left empty.