Chapter Contents

Previous

Next
oesigsetup

oesigsetup



Control Signals

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <lcsignal.h>

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


DESCRIPTION

oesigsetup determines which signals are managed by USS OS/390 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 USS, 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 USS. You must call oesigsetup in a program without exec -linkage if you need to use USS signals.

oeset defines the set of signals to be managed by USS. 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 USS, 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 USS signals, USS is not informed of the error when the corresponding error condition occurs. If the error leads to termination, USS 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 USS, 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 USS, 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 USS 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 USS. 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 USS, the result is the USS 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


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.