Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 3
Communicating With TACL Processes
When the user issues an ADDUSER command, the ADDUSER process sends the
ADDUSER message directly to the $CMON process (it does not come from the TACL
process). Similarly, the DELUSER message is received from the DELUSER program,
the PASSWORD message is received from the PASSWORD program, and the
REMOTEPASSWORD message from the RPASSWRD program. For convenience, as
well as historical consistency, these messages are still referred to as command-
interpreter messages.
After processing a command-interpreter message, $CMON sends a reply back to the
TACL process (or other process that sent the message) using a call to the REPLY
procedure. Each of the command-interpreter messages that contains a request has a
specific reply format that the TACL process expects. Some of the reply messages
have two possible formats; which one you choose usually depends on whether your
$CMON process accepts or rejects the request. This section describes with examples
the responses that a $CMON process can take for each of these messages. The
Guardian Procedure Errors and Messages Manual also describes these messages,
arranged numerically for ease of reference.
The following actions are also taken by the TACL process while communicating with
the $CMON process:
The TACL process sends all requests on a nowait basis; if a message cannot be
sent, or if $CMON does not reply, the TACL process closes the $CMON file and
proceeds to execute the command as if $CMON did not exist.
If the BREAK key is pressed while a message is outstanding to $CMON and the
user logged on to the TACL process is not the super ID (255, 255), the message
is canceled and the command is aborted. If the BREAK key is pressed while a
message is outstanding and the user logged on to the TACL process is the super
ID, the message is canceled and the command is executed.
If the TACL process encounters an I/O error when communicating with $CMON, it
closes the $CMON file and abandons the current request. The TACL process tries
to reopen $CMON and attempts communication when the next monitored
command is issued.
Note. Do not confuse command-interpreter messages with system messages; their message
numbers do overlap. Command-interpreter messages are user messages supplied in a
specific format. Unlike system messages, you do not get an error condition on reading a
command-interpreter message.