docs.intersystems.com
Home  /  Application Development: Core Topics  /  ObjectScript Reference  /  ObjectScript Special Variables  /  $ZCHILD


ObjectScript Reference
$ZCHILD
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


Contains the ID of the last child process.
Synopsis
$ZCHILD
$ZC 
Description
$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