Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1SIA): | 31-bit |
AMODE (BPX4SIA): | 64-bit |
ASC mode: | Primary address space control (ASC) 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 BPX4SIA with the same parameters. All parameter addresses and addresses in parameter structures are doublewords. The User_data parameter is a doubleword field.
The name of a fullword that contains the number of the signal to examine, set, or both set and examine the action for.
Constant | Description |
---|---|
SIG_DFL# | Take the default action for this signal. |
SIG_IGN# | Ignore this signal. |
Address | Address of the signal catcher function. |
The name of an 8-byte area that contains a 64-bit mask of signals that are to be blocked during execution of the signal-catching function. The leftmost bit represents signal number 1, and the rightmost bit represents signal number 64. Bits that are set to 1 represent signals that are blocked.
You must always provide this field, even though New_sa_mask is not used when the New_sa_handler_address parameter contains a 0.
The name of the fullword that contains the value of the signal action flags.
You must always provide this field, even though New_sa_flags is not used when the New_sa_handler_address parameter contains a 0.
Constant | Description |
---|---|
SA_FLAGS_DFT# | None of the following functions. |
SA_NOCLDSTOP# | Do not generate SIGCHLD signals to the calling process when its children stop or are continued. (This is used only when Signal is set to SIGCHLD). |
SA_OLD_STYLE# | The PPSDOLDSTYLE flag is set. This is provided for the C compiler runtime library to implement old-style signal callable service functions. The C compiler runtime library's signal interface routine is responsible for checking PPSDOLDSTYLE and setting sigaction to default action where needed. |
SA_ONSTACK# | The PPSDONSTACK flag is set. This is provided for the caller to implement alternate stack signal delivery processing. |
SA_RESETHAND# | The PPSDRESETHAND flag is set. This is provided for the caller to reset the signal action to SIG_DFL# on entry to the signal catcher. |
SA_RESTART# | The PPSDRESTART flag is set. This is provided for the caller to implement restart for functions that normally would receive an EINTR if a signal is delivered. |
SA_SIGINFO# | The PPSDSIGINF flag is set. This is provided for the caller to provide additional information to the signal catcher, namely additional signal information and user context information. |
SA_NOCLDWAIT# | Do not create zombie processes when children of the calling process exit (used only when Signal is set to SIGCHLD). |
SA_NODEFER | The PPSDNODEFER flag is set. This is provided for the caller to not automatically block the Signal when the signal catcher is invoked. |
SA_IGNORE | The value of the new_sa_handler is saved and returned on subsequent calls, but the signal is ignored. |
The name of a fullword (doubleword) that contains either zero or the address of a fullword in which the system returns the old (current) signal action. If Old_sa_handler_address is specified as 0, the old signal action, Old_sa_mask, and Old_sa_flags, are not returned.
The name of an 8-byte area where the old (current) value of the 64-bit mask of signals blocked during execution of the signal-catching function is returned. Bits that are set to 1 represent signals that are blocked.
You must provide this parameter, although Old_sa_mask is not returned when Old_sa_handler_address contains 0.
The name of the fullword in which the old (current) signal action flags are returned.
You must always provide this field, even though Old_sa_flags is not returned when Old_sa_handler_address contains 0.
The name of a fullword (doubleword) that contains 4 bytes of user-supplied data that is passed to the signal interface routine when the signal is delivered.
The name of a fullword in which the sigaction service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EINVAL | The specified signal value is incorrect or is an unsupported signal number; an attempt was made to catch a signal that cannot be caught; or an attempt was made to ignore a signal that cannot be ignored. The following reason codes can accompany the return code: JRInvalidSignal and JRInvalidSigact. |
The name of a fullword in which the sigaction service stores the reason code. The sigaction 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.
In a multithreaded process, the new signal action that is set by the sigaction service changes the signal action for all threads in the process.
For an example using this callable service, see BPX1SIA (sigaction) example.