Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 38
Sample $CMON Program
nonoperator TACL processes only if the operator has already set the
REFUSE^ALL flag to inhibit further requests.
The PROCESS^LOGOFF^MSG procedure is called when $CMON receives a
Logoff^msg message from a TACL process. It functions the same way as the
PROCESS^LOGON^MSG procedure, except that it returns a logoff message
instead of a logon message.
The PROCESS^ILLEGAL^LOGON^MSG procedure is called when $CMON
receives an Illegal^logon^msg message from a TACL process. It returns a blank
text string to the TACL process.
The PROCESS^PASSWORD^MSG procedure is called when $CMON receives a
Password^msg message from the password program. This procedure normally
accepts the request and returns a text string indicating that the password change is
approved. The request is rejected for all nonoperator TACL processes only if the
operator has already set the REFUSE^ALL flag to inhibit further requests.
The PROCESS^REMOTEPASSWORD^MSG procedure is called when $CMON
receives a Remotepassword^msg message from the RPASSWRD program. This
procedure is just like the PROCESS^PASSWORD^MSG procedure, except that it
works with remote passwords instead of local passwords.
The PROCESS^PROCESSCREATION^MSG procedure is called when $CMON
receives a Processcreation^msg message from a TACL process.
This procedure normally accepts the program file and execution priority specified in
the incoming message, but it assigns a CPU depending on the execution priority.
Processes requested to run at priority 150 or higher are run in one set of CPUs,
and processes with priority less than 150 run in the remaining CPUs. This
procedure then assigns CPUs within each group on a round-robin basis. The
procedure checks the CPU^LIST array to determine which group a CPU belongs
to.
The request is rejected for all nonoperator TACL processes only if the operator has
al
ready set the REFUSE^ALL flag to inhibit further requests.
The PROCESS^ALTPRI^MSG procedure is called when $CMON receives an
Altpri^msg message from a TACL process. This procedure changes the process
priority only if the requester is trying to decrease the priority. The request is
rejected for all nonoperator TACL processes if the operator has already set the
REFUSE^ALL flag to inhibit further requests.
The PROCESS^ADDUSER^MSG procedure is called when $CMON receives an
Adduser^msg message from the ADDUSER program. This procedure accepts the
request to add a user only if the originator of the request belongs to the operations
group.
The PROCESS^DELUSER^MSG procedure is called when $CMON receives a
Deluser^msg message from the DELUSER program. This procedure accepts the
request to delete a user from the system only if the originator of the request
belongs to the operations group.