The tcdrain callable service waits until all output sent to a file descriptor has actually been sent to the terminal device.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TDR): | 31-bit |
AMODE (BPX4TDR): | 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 BPX4TDR with the same parameters.
The name of a fullword that contains the file descriptor that represents the output device.
The name of a fullword in which the tcdrain service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EBADF | File_descriptor does not describe a valid open file. |
EINTR | A signal interrupted the service before all output had been sent. |
EIO | The process group of the process that is issuing the function is an orphaned, background process group, and the process that is issuing the function is not ignoring or blocking SIGTTOU. |
ENOTTY | File_descriptor is not associated with a terminal. |
The name of a fullword in which the tcdrain service stores the reason code. The tcdrain 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 tcdrain service.
For an example using this callable service, see BPX1TDR (tcdrain) example.