Page MenuHomeFreeBSD

Document getrlimitusage(2), new sysctl, and try to fix kern. and kern.proc. sysctl.3 sections
ClosedPublic

Authored by kib on Sep 27 2024, 8:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 8:00 AM
Unknown Object (File)
Sat, Oct 26, 10:47 AM
Unknown Object (File)
Sat, Oct 26, 10:47 AM
Unknown Object (File)
Tue, Oct 22, 2:23 PM
Unknown Object (File)
Tue, Oct 22, 9:45 AM
Unknown Object (File)
Mon, Oct 14, 6:20 AM
Unknown Object (File)
Wed, Oct 9, 8:39 PM
Unknown Object (File)
Wed, Oct 9, 8:09 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sep 27 2024, 8:03 PM

Ping? Could please somebody proof-read the grammar at least?

A couple of suggestions and fixes. On the content, I've added a question for KERN_PROC_RLIMIT_USAGE.

lib/libc/gen/sysctl.3
385
387
393
394
449
451
458
481

Sounds a bit strange to me, would rather use this idiom when talking about people, but may be fine here too, a native speaker could confirm.

496

(Would capitalize OID, but not sure about other uses in manpages.)

503

Is a note needed here about quantities that do not lend themselves to reporting some current value, such as RLIMIT_FSIZE and RLIMIT_CORE, and for which -1 is returned?

528
lib/libsys/getrlimitusage.2
33 ↗(On Diff #143825)
58 ↗(On Diff #143825)
87 ↗(On Diff #143825)
kib marked 14 inline comments as done.Oct 7 2024, 9:20 AM
kib added inline comments.
lib/libc/gen/sysctl.3
481

POSIX uses the formulations like When the identity of a group is associated with a process, .... I changed it to something similar.

503

IMO the description of ENXIO already provides that information.

kib marked 2 inline comments as done.

Handle olce' edits.

lib/libc/gen/sysctl.3
503

Mmm, but the description of ENXIO applies only to getrlimitusage(), whereas here it's the sysctl (sysctl_kern_proc_rlimit_usage()), which doesn't return an error for resources that internally return ENXIO, but instead returns the value -1 for them (and 0 as the overall return value).

Add a sentence about special non-accounted resources.

kib marked an inline comment as done.Oct 7 2024, 10:40 AM
This revision is now accepted and ready to land.Oct 7 2024, 10:43 AM