The tcgetattr callable service gets control information for a terminal and stores it in the specified Termios_structure.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, state any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TGA): | 31-bit |
AMODE (BPX4TGA): | 64-bit |
ASC mode: | Primary address space control (ASC) mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4TGA with the same parameters.
The name of a fullword that contains the file descriptor of the terminal for which you want attributes.
The name of an area into which the function is to return the terminal information. Termios_structure is mapped by the BPXYTIOS macro. This structure contains the control modes, input modes, output modes, local modes, and special control characters as defined by the POSIX standard (see BPXYTIOS — Map the termios structure).
The name of a fullword in which the tcgetattr service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EBADF | File_descriptor is not a valid open file descriptor. |
ENOTTY | The file that is associated with the file descriptor is not a terminal; the process does not have a controlling terminal; or the file is not the controlling terminal for the process. |
The name of a fullword in which the tcgetattr service stores the reason code. The tcgetattr service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
MVC C_CC+VSUSP,NEWVAL To set a new value
LA R10,VSUSP To set an register to use as an index
in a later IC or STC instructions
tcsetattr (BPX1TSA, BPX4TSA) — Set the attributes for a terminal
There are no restrictions on the use of the tcgetattr service.
For an example using this callable service, see BPX1TGA (tcgetattr) example.