Re: [PATCH v2 8/9] system_data_types.7: Document siginfo_t

Michael Kerrisk (man-pages)
2020-09-20T20:19:52Z

Hello Alex,

On 9/20/20 8:05 PM, Alejandro Colomar wrote:
> Note: There are a few members off this structure that are
> not required by POSIX (XSI extensions, and such).
>
> I simply chose to not document them at all.
>
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
> ---
>
> Hello Michael,
>
> Clearly I needed the weekend!
> Here's the patch as it should have been.

Thanks! Patch applied. Some notes below.

> man7/system_data_types.7 | 39 ++++++++++++++++++++++++++++++++++++---
> 1 file changed, 36 insertions(+), 3 deletions(-)
>
> diff --git a/man7/system_data_types.7 b/man7/system_data_types.7
> index a7955f331..080f0057f 100644
> --- a/man7/system_data_types.7
> +++ b/man7/system_data_types.7
> @@ -213,6 +213,39 @@ See also:
> See also the
> .I aiocb
> structure in this page.
> +.\"------------------------------------- siginfo_t --------------------/
> +.TP
> +.I siginfo_t
> +.IP
> +Include:
> +.IR <signal.h> ;
> +or
> +.IR <sys/wait.h> .
> +.IP
> +.EX
> +typedef struct {
> + int si_signo; /* Signal number */
> + int si_code; /* Signal code */
> +
> + pid_t si_pid; /* Sending process ID */
> + uid_t si_uid; /* Real user ID of sending process */
> + void *si_addr; /* Address of faulting instruction */
> + int si_status; /* Exit value or signal */
> +
> + union sigval si_value; /* Signal value */
> +} siginfo_t;

Some minor white space issues in the above structure (blank lines,
misaligned comments); I fixed them.

> +.EE
> +.\".IP
> +.\" FIXME: Add a description?

Generally, I think we always should have a description, even if
very short. I added one, mainly in the form of a reference to
sigaction(2).

> +.IP
> +Conforming to: POSIX.1-2001 and later.
> +.IP
> +See also:
> +.BR pidfd_send_signal (2),
> +.BR rt_sigqueueinfo (2),
> +.BR sigaction (2),
> +.BR sigwaitinfo (2),
> +.BR psiginfo (3)

That list is "just right"; thanks.

> .\"------------------------------------- sigval -----------------------/
> .TP
> .I sigval
> @@ -239,9 +272,9 @@ See also:
> See also the
> .I sigevent
> structure
> -.\"and the
> -.\".I siginfo_t FIXME
> -.\"type
> +and the
> +.I siginfo_t
> +type
> in this page.
> .\"------------------------------------- size_t -----------------------/
> .TP

Thanks,

Michael

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/