Jump to content

strsignal

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Mahesh Lekurwale (talk | contribs) at 08:52, 12 September 2011 (Description). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


strsignal is a function in the C Standard Library header file signal.h that accepts a signal number argument sig and returns a pointer to the corresponding message string. The strsignal function locates the descriptive message string for a signal number.

Requirements

To use strsignal the signal.h header file must be included.

Description

strsignal returns a pointer to the language-dependent string describing a signal. The array pointed to is not to be modified by the program, but may be overwritten by subsequent calls to strsignal. The string can be used until the next call to strsignal().

Return

strsignal returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), a NULL pointer may be returned instead for an invalid signal number.