Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 56
Getting Process Information
Getting List Information About One Process
To use the PROCESS_GETINFOLIST_ procedure to get list information about one
process, you supply the procedure with an identifier of the process you want detailed
information about. The identifier can be the process handle or a combination of the
node name, CPU number, and PIN.
The following example returns this information about the process specified in the
processhandle parameter:
Creator access ID
Process access ID
Home terminal name
Process subtype
Process execution time in microseconds
Process state
! Instead of declaring the following literals, the program
! could also use the ones already declared in the
! PROCESS^ITEMCODES section of ZSYSDEFS.ZSYSTAL.
LITERAL CREATOR^ACCESS^ID^ATTR = 1,
PROCESS^ACCESS^ID^ATTR = 2,
HOME^TERM^NAME^ATTR = 5,
PROCESS^SUBTYPE^ATTR = 8,
PROCESS^TIME^ATTR = 30,
PROCESS^STATE^ATTR = 32;
.
.
RETURN^ATTRIBUTE^LIST ':=' [CREATOR^ACCESS^ID^ATTR,
PROCESS^ACCESS^ID^ATTR,
HOME^TERM^NAME^ATTR,
PROCESS^SUBTYPE^ATTR,
PROCESS^TIME^ATTR,
PROCESS^STATE^ATTR];
RETURN^ATTRIBUTE^COUNT := 6;
RETURN^VALUES^MAXLEN := 2048;
ERROR := PROCESS_GETINFOLIST_(!cpu!,
!pin!,
!nodename:length!,
PROCESS^HANDLE,
RETURN^ATTRIBUTE^LIST,
RETURN^ATTRIBUTE^COUNT,
RETURN^VALUES^LIST,
RETURN^VALUES^MAXLEN,
RETURN^VALUES^LEN);
CREATOR^ACCESS^ID^VALUE := RETURN^VALUES^LIST[0];
PROCESS^ACCESS^ID^VALUE := RETURN^VALUES^LIST[1];
.
.