#include <lcsignal.h> void *siginfo(void);
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, Table 5.1 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.
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 OpenEdition 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.
signal
.
siggen
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.