Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Using Break (Single Process per Terminal)
If a process has enabled BREAK on more than one terminal, it
should check the logical device number returned in the system
break message to identify the source of the break.
Figure 4-2 illustrates break handling when a terminal is con-
trolled by a single process.
S5073-007
Application process
enables BREAK with
a SETMODE 11 call
BREAK disabled;
process receives
BREAK message
in $RECEIVE file
Process reenables
BREAK by performing
a READ or WRITEREAD
or by another call
to SETMODE
BREAK Enabled
BREAK Disabled
Terminal operator
types BREAK
BREAK key is ignored if typed
Figure 4-2. BREAK: Single Process per Terminal
Using Break (Multiple Processes per Terminal)
When more than one process is accessing a terminal, only the
last process to arm BREAK receives the break system message.
Therefore, it is important for each process in such an environ-
ment to keep track of the previous process that enabled BREAK and
to restore break ownership to that process when finished.
The following SETMODE operation performs this type of break
monitoring:
operation
= 11, set break ownership and terminal access
type
4-17