From 2a73d3e870a25620d39825258de151fc7c1210dc Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 30 Mar 2017 14:18:05 +0200 Subject: [PATCH] sigaction.2: Show the prototype of an SA_SIGINFO signal handler Signed-off-by: Michael Kerrisk --- man2/sigaction.2 | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/man2/sigaction.2 b/man2/sigaction.2 index 23b4703db..b1cc5bfe8 100644 --- a/man2/sigaction.2 +++ b/man2/sigaction.2 @@ -262,12 +262,29 @@ This flag is meaningful only when establishing a signal handler. .\" .I sa_sigaction .\" field was added in Linux 2.1.86.) .RE -.PP +.SS The siginfo_t argument to a SA_SIGINFO handler +When the +.B SA_SIGINFO +flag is specified in +.IR act.sa_flags , +the signal handler address is passed via the +.IR act.sa_sigaction +field. +This handler takes three arguments, as follows: + +.nf +.in +4n +void +handler(int sig, siginfo_t *info, void *ucontext) +{ + ... +} +.in +.fi + The .I siginfo_t -argument to -.I sa_sigaction -is a struct with the following fields: +data type is a structure with the following fields: .sp .in +4n .nf