]> git.ipfire.org Git - thirdparty/glibc.git/commit
manual: Document error codes missing for 'socket'
authorMaciej W. Rozycki <macro@redhat.com>
Thu, 29 May 2025 21:11:38 +0000 (22:11 +0100)
committerMaciej W. Rozycki <macro@redhat.com>
Thu, 29 May 2025 21:11:38 +0000 (22:11 +0100)
commit43afae31e0d7579deef13536c4c3704afaa017da
tree8cc0065574c308ad2138c1f3b018e7b7257749b8
parente6de31203e236fa346c2f56ce4e1f8fe82594b03
manual: Document error codes missing for 'socket'

Add missing EAFNOSUPPORT, ESOCKTNOSUPPORT, EPROTOTYPE, EINVAL, EPERM,
and ENOMEM error codes, and adjust existing descriptions accordingly.

On Linux either ENOBUFS or ENOMEM is returned in the case of a memory
allocation failure, depending on the namespace requested, e.g. AF_INET
returns ENOMEM while AF_INET6 returns ENOBUFS, so document these codes
as alternatives.

Similarly EPERM is returned rather than EACCES on Linux, so document
these codes as alternatives as well.  We might want to convert EPERM to
EACCES for POSIX compliance, but it is beyond the scope of this change,
and software has to expect either anyway, owing to the long-established
practice.

Finally ESOCKTNOSUPPORT is returned rather than EPROTONOSUPPORT for an
unsupported style except for the AF_QIPCRTR namespace where EPROTOTYPE
is used, so document these codes as alternatives too.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
manual/socket.texi