Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
23 - 1
23
Writing a Command-Interpreter
Monitor ($CMON)
A command-interpreter monitor process ($CMON) controls the operation of TACL
processes. When a TACL process receives certain commands from a terminal user, it
sends a request message to the $CMON process to have the request verified.
A $CMON process controls the following kinds of requests:
Command-interpreter configuration requests
Logon and logoff requests (LOGON and LOGOFF commands)
Attempts to change user passwords (PASSWORD and REMOTEPASSWORD
commands)
Requests to create processes (implicit or explicit RUN commands)
Requests to change process priority (ALTPRI command)
Requests to add or delete users (ADDUSER and DELUSER commands)
The $CMON process receives requests from TACL processes by reading messages
from its $RECEIVE file. $CMON processes each message and then sends a reply to
the requesting TACL process. The $CMON process functions in the same way as any
server process.
When replying to a command-interpreter request, $CMON can either accept the
request, with or without modification, or reject the request and supply some display text
giving the reason for the rejection.
This section describes how you can write your own $CMON process. Your $CMON
process can either provide static replies that are hard coded into the $CMON program
or perform run-time control, allowing the operator to set reply information such as the
text displayed at logon or the set of CPUs that a process is able to run in.
Although the examples given in this section are written in TAL, there is no need to use
TAL to write a $CMON process. You can use any supported programming language:
for example, COBOL, C, or Pascal.