The getsid callable service gets the process group ID of the session leader of the process whose process ID is equal to the input process ID. If the input process ID is 0, the service returns the process group ID of the session leader of the calling process.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GES): | 31-bit |
AMODE (BPX4GES): | 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 BPX4GES with the same parameter.
The name of a fullword that contains the process ID that identifies the process whose session leader's process group ID should be obtained. If PID is 0, the process group ID of the calling process's session leader is returned.
The name of a fullword in which the getsid service returns a process group ID, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EPERM | The process whose process ID is equal to PID is not in the same session as the calling process. |
ESRCH | There is no process with a process ID equal to PID. |
The name of a fullword in which the getsid service stores the reason code. The getsid 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 getsid service.
For an example using this callable service, see BPX1GES (getsid) example.