diff options
author | peter <peter@FreeBSD.org> | 1999-05-18 04:48:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-05-18 04:48:58 +0000 |
commit | 91cb63bd8223191ce6a215de17a443593f687017 (patch) | |
tree | ca6b84ed415b795714421da075acf2dec7728934 /lib/libc/gen/psignal.3 | |
parent | 1d5521a97728c89e833a1b1790e8d9f257cf6206 (diff) | |
download | FreeBSD-src-91cb63bd8223191ce6a215de17a443593f687017.zip FreeBSD-src-91cb63bd8223191ce6a215de17a443593f687017.tar.gz |
Add a strsignal(3) (like strerror(3)) for libc compatability with other
systems. NetBSD, Linux, SVR4 etc all have it.
Diffstat (limited to 'lib/libc/gen/psignal.3')
-rw-r--r-- | lib/libc/gen/psignal.3 | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3 index aa78732..0018c8a 100644 --- a/lib/libc/gen/psignal.3 +++ b/lib/libc/gen/psignal.3 @@ -36,6 +36,7 @@ .Os BSD 4.2 .Sh NAME .Nm psignal , +.Nm strsignal , .Nm sys_siglist , .Nm sys_signame .Nd system signal messages @@ -43,16 +44,29 @@ .Fd #include <signal.h> .Ft void .Fn psignal "unsigned sig" "const char *s" +.Ft "char *" +.Fn strsignal "unsigned sig" .Vt extern const char * const sys_siglist[]; .Vt extern const char * const sys_signame[]; .Sh DESCRIPTION The .Fn psignal -function locates the descriptive message -string for the given signal number +and +.Fn strsignal +functions locate the descriptive message +string for a signal number. +.Pp +The +.Fn strsignal +function accepts a signal number argument .Fa sig -and writes it to the standard error. +and returns a pointer to the corresponding message string. .Pp +The +.Fn psignal +function accepts an signal number argument +.Fa sig +and writes it to the standard error. If the argument .Fa s is @@ -86,7 +100,8 @@ and .Va sys_signame . .Sh SEE ALSO .Xr sigaction 2 , -.Xr perror 3 +.Xr perror 3 , +.Xr strerror 3 .Sh HISTORY The .Fn psignal |