oesigsetup -- Control Signals

SYNOPSIS

 #include <lcsignal.h>

 int oesigsetup(sigset_t *oeset, sigset_t *sascset);
 

DESCRIPTION

oesigsetup determines which signals are managed by OpenEdition MVS and which are managed by the SAS/C library. oesigsetup must be called before any signal-related function other than the signal set functions, such as sigfillset and sigaddset.

If there is no call to oesigsetup in a program called with exec-linkage, the library assumes that all signals should be managed through OpenEdition, if possible.

If there is no call to oesigsetup in a program not called with exec-linkage (a regular batch or TSO execution), the library assumes that no signals should be managed by OpenEdition. You must call oesigsetup in a program without exec-linkage if you need to use OpenEdition signals.

oeset defines the set of signals to be managed by OpenEdition. sascset defines the signals to be managed by SAS/C. oesigsetup fails if a signal is included in both sets; any signal not mentioned is managed in the same way as if oesigsetup had not been called.

The signals that can be managed either by SAS/C or by OpenEdition, the flexible signals, can be divided into two groups: error signals and other signals. The error signals are

Error signals are normally associated with program error conditions. Unless these signals are handled as OpenEdition signals, OpenEdition is not informed of the error when the corresponding error condition occurs. If the error leads to termination, OpenEdition sets the final status of the terminated process to terminated by SIGKILL rather than a more specific status.

The other flexible signals are listed here:

SIGALRM
If SIGALRM is managed by OpenEdition, the alarmd and sleepd functions are not available. If SIGALRM is managed by the SAS/C library, the ps shell command does not accurately indicate when the process is sleeping.
SIGINT
If SIGINT is managed by SAS/C, SIGINT is generated by the TSO attention key for a program running under TSO. If SIGINT is handled by OpenEdition, SAS/C does not use the STAX macro or attempt to handle TSO attentions. SAS/C management of SIGINT is not useful in non-TSO address spaces.
SIGIO
SIGIO has no special meaning at present for OpenEdition or SAS/C; it may be used by future versions of either product.
SIGTERM
SIGTERM has no defined meaning to SAS/C; it can be generated only using raise if it is managed by SAS/C.
SIGUSR1, SIGUSR2
These signals have no special meaning for OpenEdition. SAS/C user-added signal support defines a meaning for one of these symbols only if they have been defined by oesigsetup as signals managed by SAS/C.

If you have defined a signal as managed by SAS/C and the signal is generated by OpenEdition, the result is the OpenEdition default action for the signal. For example, if you define SIGTERM as a signal managed by SAS/C and establish a handler, and another process uses kill to send your process a SIGTERM signal, your handler is not called, and the process is terminated.

A program can use kill to send a signal that oesigsetup has defined as a signal managed by SAS/C. If a program sends the signal to itself, only default handling takes place.

EXAMPLE

See the example for kill.

RELATED FUNCTIONS

sigaddset

SEE ALSO

Signal-Handling Functions

Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.