GetProcessExitCode (open)
Get the process exit code, if it stopped
Syntax
LOADLIB "wh::os.whlib";
INTEGER FUNCTION GetProcessExitCode(INTEGER processid)
Parameters
INTEGER processid
Process to request the exit code for
Return value
INTEGER
The process exit code, as reported by the OS, -1 if the process is not yet terminated
Description
This function retrieves the process's exit code, if it already exited. You should use the IsProcessRunning() and WaitForProcessOutput() to verify that the process has shutdown before reading its exit code.