Skip to main content

$ZCHILD (ObjectScript)

Contains the ID of the last child process.




$ZCHILD contains the ID of the last child process (the PID) that the current process created with the JOB command or the $ZF(-100) function. If your process has not used JOB or $ZF(-100) to create a child process, $ZCHILD returns 0 (zero).

$ZCHILD being set does not mean that the job was successfully started. It only means that the process was created and the parameters were passed successfully.

For example, if you use JOB to spawn a routine that does not exist, both $TEST and $ZCHILD report that the JOB command succeeded, although that new job immediately dies with a <NOROUTINE> error.

This special variable cannot be modified using the SET command. Attempting to do so results in a <SYNTAX> error.

See Also

FeedbackOpens in a new tab