If the external program experiences a problem, it should return with a non-zero exit code and may print error messages on standard error. Any output written to standard output before termination must conform to the rules below.
Otherwise, it must return with exit code zero, may print diagnostics on standard error, and must provide additional data on standard output. This output is different for different operations, as described in the following sections.