BPX4SIA (sigaction) example
The following code sets new action for SIGALRM to default
processing and returns the previous action for SIGALARM.
For the callable service, see sigaction (BPX1SIA, BPX4SIA) — Examine or change a signal action.
For the data structure, see BPXYSIGH — Signal constants.
AMODE 31 callers use BPX1SIA (sigaction) example.
XC NEWMASK,NEWMASK Don't block additional signals
LA R15,NCATCHER New catcher (NCATCHER=0,1 ->)
STG R15,NEWHANDL
LA R15,OCATCHER Old catcher (NCATCHER=0,1 ->)
STG R15,OLDHANDL
SPACE ,
CALL BPX4SIA, Examine or change signal action +
(=A(SIGALRM#), Input: Signal constant BPXYSIGH +
NEWHANDL, Input: 0, ->0, ->1 or ->catcher +
NEWMASK, Input: 64Bit mask of signals +
=A(0), Input: Action, BPXYSIGH +
OLDHANDL, 0, ->XL4 (return 0, 1 ->catcher) +
OLDMASK, 64 bit mask of signals +
OLDFLAGS, Action, BPXYSIGH +
=AD(0), Data passed to signal routine +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------