Page MenuHomeFreeBSD

Update mq_open(2) to document an error case and mqueuefs(5) to document sysctl variables
Needs ReviewPublic

Authored by felix.the.red_gmail.com on Oct 16 2021, 5:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 24, 5:32 PM
Unknown Object (File)
Sat, Jan 18, 10:11 PM
Unknown Object (File)
Sat, Jan 18, 10:08 PM
Unknown Object (File)
Dec 13 2024, 3:56 AM
Unknown Object (File)
Dec 9 2024, 7:28 PM
Unknown Object (File)
Dec 6 2024, 8:54 AM
Unknown Object (File)
Nov 2 2024, 6:33 PM
Unknown Object (File)
Oct 18 2024, 5:16 AM
Subscribers

Details

Reviewers
markj
ziaee
Group Reviewers
manpages
Summary

This documents a case where mq_open can fail and return EINVAL (see PR 243209)
if doing so would exceed limits specified by sysctl values.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

markj added inline comments.
lib/libc/sys/mq_open.2
281 ↗(On Diff #96942)

I think this is ok but perhaps deserves some additional qualification: the limits are only relevant if O_CREAT is set, and maxmsgsize and maxmsg are only checked if the mq_open(O_CREAT) call also specifies a mq_attr.

314 ↗(On Diff #96942)

mqueuefs(5) might be a better place to document these?

felix.the.red_gmail.com retitled this revision from Update mq_open(2) to document an error case and sysctl variables to Update mq_open(2) to document an error case and mqueuefs(5) to document sysctl variables.Oct 16 2021, 3:57 PM

Move sysctl documentation to mqueuefs(5).
Qualify description for EINVAL error to note the use of O_CREAT and attr.

markj added inline comments.
share/man/man5/mqueuefs.5
126 ↗(On Diff #96950)

I am a bit skeptical that it is worth documenting default values: if they ever change, this document will be out of date, and users can find the default values simply by reading the sysctl.

This revision is now accepted and ready to land.Oct 16 2021, 5:33 PM
ziaee requested changes to this revision.Wed, Feb 12, 2:24 PM

Thanks for adding manpages! Can you make this patch against current? The manuals have changed a lot since then and have also moved.

mq_open.2 has been moved to src/lib/libsys/, and mqueuefs.5 has been moved to src/share/man/man4/mqueuefs.4.

The best way is to use git-arc.sh from src/tools/tools/git/git-arc.sh (which has a great manual in the same directory). Thanks! I do love to see sysctls and errors added to the manual, people can search for them directly with apropos.

This revision now requires changes to proceed.Wed, Feb 12, 2:24 PM
felix.the.red_gmail.com edited the summary of this revision. (Show Details)
felix.the.red_gmail.com set the repository for this revision to rG FreeBSD src repository.

Updated to -current.