dg_strsignal(3C) SDK R4.11 dg_strsignal(3C)
NAME
dgstrsignal - get message string describing the given signal
SYNOPSIS
#include <signal.h>
char *dgstrsignal (int signum);
DESCRIPTION
dgstrsignal maps the signal number signum to a message string
describing the signal, and returns a pointer to that string.
dgstrsignal uses the same set of signal messages as psignal. The
returned string should not be overwritten.
If signum is an illegal value, a pointer to the string "UNKNOWN
SIGNAL" will be returned.
SEE ALSO
psignal(3C).
EXAMPLE
The following program prints a message describing the SIGSEGV signal.
/* Program test for the dgstrsignal() function */
#include <signal.h>
#include <stdio.h>
char *dgstrsignal();
main() {
printf("SIGSEGV signal string is: %s\n", dgstrsignal(SIGSEGV));
}
A call to this program generates the output
SIGSEGV signal string is: Segmentation Fault
SEE ALSO
psignal(3C).
Licensed material--property of copyright holder(s)