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 <sys/siginfo.h> .
+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
.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
.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 <sys/siginfo.h> .
+If
+.Dv SA_SIGINFO
+is not set, this is NULL.
.Fa Scp
is a pointer to the
.Fa sigcontext