psignal or psiginfo Subroutine or sys_siglist Vector
Purpose
Prints system signal messages to standard error.
Library
Standard C Library (libc.a)
Syntax
Description
The psiginfo and psignal subroutine prints a message on stderr associated with a signal number. First the String parameter is printed, then the name of the signal and a new line character.
The psiginfo and psignal subroutine does not change the orientation of the standard error stream.
The psiginfo and psignal subroutine does not change the setting of errno if successful.
The psiginfo and psignal subroutine marks the updates of the last data modification and last file status change timestamps of the file associated with the standard error stream at some time between their successful completion and exit, abort, or the completion of fflush or fclose on stderr.
To simplify variant formatting of signal names, the sys_siglist vector of message strings is provided. The signal number can be used as an index in this table to get the signal name without the new-line character. The NSIG defined in the signal.h file is the number of messages provided for in the table. It should be checked because new signals may be added to the system before they are added to the table.
Parameters
Item | Description |
---|---|
Info | Points to a valid siginfo_t. |
Signal | Specifies a signal. The signal number should be among those found in the signal.h file. |
String | Specifies a string that is printed. Most usefully, the String parameter is the name of the program that incurred the signal. |