isatty (BPX1ITY) (POSIX Version) — Determine whether a file descriptor represents a terminal
Function
The isatty callable service determines whether a file is a terminal.
Requirements
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE: | 31-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
Format
The syntax format is as follows:
|
Parameters
- File_descriptor
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword containing the file descriptor.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the isatty service returns 1 if File_descriptor is a terminal, or 0 if it is not a terminal.
Usage notes
This function does not return -1. If the file descriptor is not valid, a zero is returned. If this service fails for other reasons, the process abends.
Related services
Characteristics and restrictions
There are no restrictions on the use of the isatty service.
Examples
For an example using this callable service, see BPX1ITY (isatty) example.