Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 19
Controlling Process Creation
To allow process creation, $CMON returns the Processcreation^accept structure with
the reply code set to 0. This structure also contains the name of the program file to
run, the priority at which the process will run, and the number of the CPU in which the
process will run. $CMON can change any of these values from those that it received in
the Processcreation^msg message.
The format of the Processcreation^accept structure for allowing process creation is
shown below:
To reject a request to create a process, $CMON returns the Processcreation^reject
message to the TACL process with the reply code set to 1 and the remainder of the
Format of Processcreation^accept structure:
STRUCT PROCESSCREATION^ACCEPT;
BEGIN
INT REPLY^CODE; ![0] 0 to allow process creation
INT PROGNAME[0:11]; ![1] expanded name of program
! file to be run
INT PRIORITY; ![13] execution priority of the
! new process.
! 0 = PRI option specified
by
! user. If no PRI option
! is specified, then
TACL
! priority minus 1.
! >0 = execution priority
! <0 = PRI option specified
by
! user plus negative
! priority offset
returned
! in this field.
! If no PRI option is
! specified by user,
then
! TACL priority minus 1
! plus negative priority
! offset returned in
this
! field. For example,
! PRI = 150,
! priority = -5,
priority
! used = 145).
INT PROCESSOR; ![14] processor where the new
! process is to run or -1.
! If -1, then the processor
! in which the TACL process
! is running is used.
END;