Generic Terminal APIs

The Generic Terminal APIs are:


Generic terminal concepts

The Generic Terminal provides an environment for running programs that use descriptors for reading input and writing output. Typically the programs are C, C++, or Java™ programs that read input from standard input, write regular output to standard output, and write error output to standard error.

A terminal is started, run, and ended from an interactive job. When a terminal is started by Qp0zStartTerminal(), an interpreter process is started in batch with descriptors 0, 1, and 2 connected to pipes in the interactive job. A user specified program runs in the interpreter process. After calling Qp0zRunTerminal(), an interactive user can send input to the program and see the output written by the program. The resources used by the terminal are cleaned up by calling Qp0zEndTerminal(). It closes the pipes and ends the interpreter process.


Terminal window

After calling Qp0zRunTerminal(), the terminal window is displayed. The interactive user enters input that is sent to the interpreter process and sees output that comes from the interpreter process. The terminal window has these parts:

The terminal window supports these command keys:



Programs running in the interpreter process

The program can use descriptor 0 (or standard input) to read input, descriptor 1 (or standard output) to write regular output, and descriptor 2 (or standard error) to write error output. The program can use the following functions to work with the terminal to which it is connected.

The program also needs to decide how to handle the following signals:


[ Back to top | UNIX-Type APIs | APIs by category ]