From 85ffd6ecaf98e0c484ff0b0bcfb911430fe651c1 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 3 Feb 1997 15:57:05 +0000 Subject: [PATCH] wimpy docs for SA_SIGINFO --- lib/libc/sys/sigaction.2 | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index e1458bc1a04..24435274ad0 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -183,6 +183,20 @@ the system will deliver the signal to the process on a specified with .Xr sigstack 2 . .Pp +Finally, the +.Dv SA_SIGINFO +option causes the 2nd argument for the signal handler to be a pointer +to a +.Em siginfo_t +as described in +.Pa . +The +.Em siginfo_t +is a part of +.St -p1003.1b . +and provides much more information about the causes and +attributes of the signal that is being delivered. +.Pp If a signal is caught during the system calls listed below, the call may be forced to terminate with the error @@ -288,8 +302,9 @@ is set to indicated the reason. .Sh EXAMPLE The handler routine can be declared: .Bd -literal -offset indent -void handler(sig, code, scp) -int sig, code; +void handler(sig, sip, scp) +int sig; +siginfo_t *sip; struct sigcontext *scp; .Ed .Pp @@ -297,10 +312,17 @@ Here .Fa sig is the signal number, into which the hardware faults and traps are mapped. -.Fa Code -is a parameter that is either a constant -or the code provided by -the hardware. +If the +.Dv SA_SIGINFO +option is set, +.Fa sip +is a pointer to a +.Dv siginfo_t +as described in +.Pa . +If +.Dv SA_SIGINFO +is not set, this is NULL. .Fa Scp is a pointer to the .Fa sigcontext -- 2.20.1