161111Sbostic.\" Copyright (c) 1983, 1991, 1993 261111Sbostic.\" The Regents of the University of California. All rights reserved. 320570Smckusick.\" 448352Scael.\" %sccs.include.redist.man% 520570Smckusick.\" 6*68455Smckusick.\" @(#)psignal.3 8.2 (Berkeley) 02/27/95 748352Scael.\" 848352Scael.Dd 948352Scael.Dt PSIGNAL 3 1048352Scael.Os BSD 4.2 1148352Scael.Sh NAME 1248352Scael.Nm psignal , 13*68455Smckusick.Nm sys_siglist , 1458377Sbostic.Nm sys_signame 1548352Scael.Nd system signal messages 1648352Scael.Sh SYNOPSIS 1758377Sbostic.Fd #include <sys/signal.h> 1848352Scael.Ft void 1948352Scael.Fn psignal "unsigned sig" "const char *s" 2048352Scael.Vt extern char *sys_siglist[]; 2158377Sbostic.Vt extern char *sys_signame[]; 2248352Scael.Sh DESCRIPTION 2348352ScaelThe 2448352Scael.Fn psignal 2548352Scaelfunction locates the descriptive message 2658377Sbosticstring for the given signal number 2748352Scael.Fa sig 2858377Sbosticand writes it to the standard error. 2948352Scael.Pp 3048352ScaelIf the argument 3148352Scael.Fa s 3248352Scaelis 3348352Scael.Pf non- Dv NULL 3458377Sbosticit is written to the standard error file descriptor 3558377Sbosticprior to the message string, 3658377Sbosticimmediately followed by a colon and a space. 3758377SbosticIf the signal number is not recognized 3858377Sbostic.Pq Xr sigaction 2 , 3958377Sbosticthe string 4058377Sbostic.Dq "Unknown signal 4158377Sbosticis produced. 4248352Scael.Pp 4348352ScaelThe message strings can be accessed directly 4458377Sbosticthrough the external array 4558377Sbostic.Va sys_siglist , 4658377Sbosticindexed by recognized signal numbers. 4758377SbosticThe external array 4858377Sbostic.Va sys_signame 4958377Sbosticis used similarly and 5058377Sbosticcontains short, lower-case abbreviations for signals 5158377Sbosticwhich are useful for recognizing signal names 5258377Sbosticin user input. 5348352ScaelThe defined variable 5448352Scael.Dv NSIG 5558377Sbosticcontains a count of the strings in 5658377Sbostic.Va sys_siglist 5758377Sbosticand 5858377Sbostic.Va sys_signame . 5948352Scael.Sh SEE ALSO 6048352Scael.Xr sigaction 2 , 6148352Scael.Xr perror 3 6248352Scael.Sh HISTORY 6348352ScaelThe 6448352Scael.Fn psignal 6548352Scaelfunction appeared in 6648352Scael.Bx 4.2 . 67