Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 27
Selecting BREAK Mode
10 Communicating With Terminals
Selecting BREAK Mode
Although several processes may have access to a terminal, a process can gain
exclusive access to that terminal when BREAK is pressed. Such a process is
executing in BREAK mode. You establish BREAK mode at the same time you take
BREAK ownership.
When a process executes in BREAK mode, it can communicate with the terminal using
only operations that have BREAK access. Once BREAK access is established, the
process has exclusive access to the terminal.
The following steps are involved in using BREAK mode:
1. Enable BREAK and establish BREAK mode using either SETPARAM function 3 or
SETMODE function 11.
2. Set BREAK access using SETMODE function 12.
3. Relinquish BREAK mode and BREAK access using SETMODE function 12.
4. Return ownership to the previous BREAK owner using SETPARAM function 3 or
SETMODE function 11.
These steps are described in detail in the following paragraphs.
Your program can establish BREAK access before or after the user presses the
BREAK key. If you establish BREAK access after pressing the BREAK key, then the
terminal is inaccessible between pressing the BREAK key and establishing BREAK
access, as shown in Figure 10-8.