Page MenuHomeFreeBSD

Document si_code values for sigaction(2)
Needs ReviewPublic

Authored by felix.the.red_gmail.com on Jun 26 2025, 3:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 2:23 AM
Unknown Object (File)
Sep 14 2025, 7:37 AM
Unknown Object (File)
Sep 13 2025, 12:16 AM
Unknown Object (File)
Sep 12 2025, 8:31 PM
Unknown Object (File)
Sep 12 2025, 4:31 PM
Unknown Object (File)
Sep 11 2025, 6:50 AM
Unknown Object (File)
Sep 6 2025, 11:55 AM
Unknown Object (File)
Aug 30 2025, 7:39 AM
Subscribers

Details

Reviewers
brooks
kib
jhb
imp
markj
rwatson
Group Reviewers
manpages
Summary

lib/libsys/sigaction.2: Remove list of signals and refer to siginfo(3) instead.
lib/libsys/sigaction.2: Add reference to siginfo(3) in EXAMPLES
lib/libsys/sigaction.2: Remove Tn macros for mandoc -Tlint warnings

From the original PR:
The Linux sigaction(2) man page provides a detailed and useful enumeration
of possible si_code values (e.g., SI_*, ILL_*, FPE_*, etc), whereas the FreeBSD
man page does not. It would be quite useful if the FreeBSD man page
were extended to document this information.

PR:217892

Test Plan

Not sure how to test this.
I ran mandoc -Tlint and removed the Tn macros.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Adding some reviewers whom I suspect to be familiar with the content.

(missed one, sorry for the noise)

lib/libsys/sigaction.2
381

It does not matter. Why do you think it is the fact?

398

This is probably confusing for reader, since in fact those are not real members. There is a hack to pack both variants into single place.

403

I do not understand what it does mean 'subset' there. For all arches supported by FreeBSD ATM, the calling conventions for fixed arg functions are same for the three-arg vs single-arg. This is why it doesn't matter.

422

Where did you get this idea?

423

We already have siginfo(3). Any additional details should go there instead of repeating n times.

If the patch is not needed, please close the PR and I will abandon the revision.

Hmm, much of this seems to be moving existing text? But also, we currently document si_code values in siginfo(3). The thing that probably would be good to do is to adjust the existing paragraph about the code argument to explicitly refer to siginfo(3) for the list of valid codes.

felix.the.red_gmail.com edited the summary of this revision. (Show Details)
felix.the.red_gmail.com edited the test plan for this revision. (Show Details)

lib/libsys/sigaction.2: Remove list of signals and refer to siginfo(3) instead.
lib/libsys/sigaction.2: Add reference to siginfo(3) in EXAMPLES
lib/libsys/sigaction.2: Remove Tn macros for mandoc -Tlint warnings

I suggest to split the diff into two.
One for doing something with the signal list, if you decide to move it (or rather merge with the list in signal(3)).
And second for the .Tn removal etc (BTW why?). There is also .St macro, which might be appropriate in some places.

lib/libsys/sigaction.2
342

I do not see the list of signals inf siginfo(3). There is the signal list in signal(3).

This list must be either kept or moved, you just remove it.