Chapter Contents

Previous

Next
siginfo

siginfo



Obtain Information about a Signal

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <lcsignal.h>

void *siginfo(void);


DESCRIPTION

siginfo returns information about a signal that is being handled. The value returned by siginfo is of type void * ; it generally must be converted to some other signal-specific type to use the information. For signals that occur naturally, the data addressed by the siginfo pointer are signal dependent but provide information about the causes of the interrupt. With some signals, such as SIGFPE, the pointer returned by siginfo also addresses data that can be modified to change the value of an erroneous expression. Refer to the description of each signal for details on what is returned by a call to siginfo when a signal occurs naturally. In addition, Summary of Information from siginfo summarizes what siginfo returns for each signal.

If a signal is generated artificially by a call to siggen , the value returned by siginfo is the same as the second argument to siggen . If a signal is generated artificially by a call to raise , the value returned by siginfo is NULL .

If more than one signal handler is active at the time siginfo is called, information is returned for the signal whose handler was called most recently.


RETURN VALUE

When siginfo is called in a signal handler, it returns a pointer to information associated with the signal being handled. The pointer may need to be converted to some other type before using. If siginfo is called outside a handler, it returns NULL .

The return value of siginfo for any signal managed by USS is always NULL , unless the signal was generated by using the siggen function, or the signal was a program check or ABEND directly associated with a program error, such as a SIGFPE signal caused by program division by zero.


EXAMPLE

See the example for signal .


RELATED FUNCTIONS

siggen


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

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