The tcsetpgrp callable service moves the requested process group into the foreground, replacing the current foreground process group. The current foreground process group then becomes a background process group.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TSP): | 31-bit |
AMODE (BPX4TSP): | 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 BPX4TSP with the same parameters.
The name of a fullword that contains the file descriptor of the terminal device.
The name of a fullword that contains the process group ID that is to be associated with the controlling terminal.
The name of a fullword in which the tcsetpgrp 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. |
EINTR | A signal interrupted the function. |
EINVAL | Process_group_ID is not a process group ID that is supported by this implementation. |
ENOTTY | The calling process does not have a controlling terminal; File_descriptor is not associated with the controlling terminal; or the controlling terminal is no longer associated with the session of the calling process. |
EPERM | Process_group_ID does not match the process group ID of any process in the same session as the calling process. |
The name of a fullword in which the tcsetpgrp service stores the reason code. The tcsetpgrp 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.
SIGTTOU processing | Expected behavior |
---|---|
Default or signal handler | The SIGTTOU signal is generated. |
Ignored or blocked | The SIGTTOU signal is not sent. |
There are no restrictions on the use of the tcsetpgrp service.
For an example using this callable service, see BPX1TSP (tcsetpgrp) example.