Guardian Programmer's Guide

Table Of Contents
Communicating With a TACL Process
Guardian Programmer’s Guide 421922-014
8 - 19
Waking the TACL Process
Waking the TACL Process
The Wakeup message can be sent by an application process to the TACL process to
cause the TACL process to return to command-input mode. In command-input mode,
TACL prompts for commands.
You might want to use the Wakeup message for one of the following reasons:
If a process takes BREAK ownership away from the TACL process and then
becomes unresponsive, pressing BREAK does not return control to the TACL
process because it no longer owns BREAK. In addition, the program that does
own BREAK is not checking for BREAK. In this case, you can run a program from
another terminal to send the TACL process the Wakeup message. The TACL
prompt then appears on the user’s terminal, allowing the user to continue.
See Section 10, Communicating With Terminals, for a discussion of the BREAK
key.
Your program might initially interact with the user, then start some long processing
without user interaction. Before starting the long processing, your process could
send the TACL process a Wakeup message to allow the user to continue.
The Wakeup message is made up of one word containing a message code of -20:
To send the message code to the TACL process, you first need to open the TACL
process as you would any process. Then you write the Wakeup message to the
returned file number. The following example shows how:
?INSPECT, SYMBOLS
?NOLIST
?SOURCE $SYSTEM.SYSTEM.EXTDECS(FILE_OPEN_,WRITE,
? DEBUG)
?LIST
PROC AWAKE^CI MAIN;
BEGIN
LITERAL MAXLEN = 256;
STRUCT WAKEUP^MSG;
BEGIN
INT MSGCODE;
END;
INT LENGTH; !length of CI name
INT CI^NUM; !number of open CI file
Structure of the Wakeup message:
STRUCT WAKEUP^MSG;
BEGIN
INT MSGCODE; !value -20
END;