The tcgetsid callable service obtains the process group ID of the session leader that is associated with the terminal that is specified by the file descriptor.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TGS): | 31-bit |
AMODE (BPX4TGS): | 64-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. |
|
AMODE 64 callers use BPX4TGS with the same parameters.
The name of a fullword that contains the file descriptor for the terminal.
The name of a fullword in which the tcgetsid service returns the process group ID associated with the terminal if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EACCES | The File_descriptor parameter is not associated with a controlling terminal. |
EBADF | The File_descriptor parameter does not specify a valid file descriptor. |
ENOTTY | The file descriptor is not associated with a terminal device. |
The name of a fullword in which the tcgetsid service stores the reason code. The tcgetsid 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.
There are no restrictions on the use of the tcgetsid service.