tcsendbreak (BPX1TSB, BPX4TSB) — Send a break condition to a terminal
Function
The tcsendbreak callable service sends a BREAK signal to a terminal that uses asynchronous serial data transmission.
If the target terminal is an OCS-attached serial terminal, the BREAK signal is sent to the terminal. If the target terminal is a pseudoterminal (pty), control returns without any significant action.
Requirements
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1TSB): | 31-bit |
AMODE (BPX4TSB): | 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. |
Format
CALL BPX1TSB,(File_descriptor,
Duration,
Return_value,
Return_code,
Reason_code)
AMODE 64 callers use BPX4TSB with the same parameters.
Parameters
- File_descriptor
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword that contains the file descriptor for the terminal device to which the break is to be sent.
- Duration
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword that contains the duration of the BREAK transmission. If the target terminal is a pseudoterminal, the Duration parameter has no effect.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the tcsendbreak service returns
0
if the request is successful, or-1
if it is not successful. - Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the tcsendbreak service stores the return code. The tcsendbreak service returns Return_code only if Return_value is-1
. For a list of return code values, see Return codes (errnos) in z/OS UNIX System Services Messages and Codes. The tcsendbreak service can return one of the following values in the Return_code parameter:Return_code Explanation EBADF File_descriptor is not a valid open file descriptor. EINTR The tcsendbreak (BPX1TSB, BPX4TSB) service was called from a background job, and the SIGTTOU signal either had default action or a signal handler. The function was not performed. 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. - Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the tcsendbreak service stores the reason code. The tcsendbreak service returns Reason_code only if Return_value is
-1
. Reason_code further qualifies the Return_code value. For a list of reason codes, see Reason codes in z/OS UNIX System Services Messages and Codes.
Usage notes
The following table defines the processing of the SIGTTOU signal when tcsendbreak is called from a background process against a controlling terminal:
SIGTTOU processing | Expected behavior |
---|---|
Default or signal handler | The SIGTTOU signal is generated.
The function is not performed. Return_value is set to - 1 ,and Return_code is set to EINTR. |
Ignored or blocked | The SIGTTOU signal is not sent.
The function continues normally. |
Related services
Characteristics and restrictions
There are no restrictions on the use of the tcsendbreak service.