process.output

process.output

process.output

Function

Execute the command synchronously and return the output object.

Syntax

Parameters

No parameters.

Return value

TypeDescription
ObjectReturns the process execution result object.

Output object fields

FieldTypeMust existDescription
statusIntYesChild process exit code. A normal exit is usually 0; if the exit code cannot be obtained, -1 is returned.
stdoutStringYesStandard output text, lossy converted to UTF-8.
stderrStringYesStandard error text, lossy converted to UTF-8.

Example

Notes

  • This method blocks the current process until the child process exits.