pause (BPX1PAS, BPX4PAS) — Suspend a process pending a signal

Function

The pause service suspends execution of the calling thread until delivery of a signal whose action is either to execute a signal-catching function or to end the thread.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, PSW key when the process was created (not PSW key 0)
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1PAS): 31-bit
AMODE (BPX4PAS): 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

The syntax format is as follows:
CALL BPX1PAS,(Return_value,
              Return_code,
              Reason_code)

AMODE 64 callers use BPX4PAS with the same parameters.

Parameters

Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the pause service returns -1 if completion of a signal-handling function causes control to be returned. The pause service does not otherwise return to its caller.

Return_code
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the pause service stores the return code. The pause 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 pause service can return the following value in the Return_code parameter:
Return_code Explanation
EINTR A signal was received and handled successfully.
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the pause service stores the reason code. The pause 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

  1. A thread that calls the pause service does not resume processing until a signal is delivered with an action to either process a signal-handling function or end the thread. Some signals can be blocked by the thread's signal mask; see sigprocmask (BPX1SPM, BPX4SPM) — Examine or change a process's signal mask for details.
  2. If an incoming unblocked signal ends the thread, pause never returns to the caller.
  3. If the signal action is to process a signal-catching function, the signal interface routine (SIR), which is defined by the mvssigsetup call, is given control when the pause service returns.
  4. A return code is set when any failures are encountered that prevent this function from completing successfully.
  5. The signal interface routine is given control only when the PSW key of the caller is equal to the signal delivery key of the process. The signal delivery key is set to the PSW key of caller of the first callable service that dubbed the process.
  6. If the caller has a PSW key that is different from the signal delivery key, or has a PSW key of zero, pause returns a return code of EMVSERR and a reason code of JRPSWKeyNotValid.

Related services

Characteristics and restrictions

See The relationship of z/OS UNIX signals to callable services.