Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Sun, 02 Jun 2019 08:54:07 +0000

>Short version: For recent libc releases, and at least on Gentoo,
>getgrent() and endgrent() seem to magically set errno to EINVAL (I
>think), except when errno's value is actually meaningful.
> (...)
>End of file or error (errno = Success)
>errno = Invalid argument
POSIX says:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/endgrent.html

"The setgrent() and endgrent() functions shall not change the setting of
errno if successful."

So I'd advise reporting the bug to the glibc maintainers.

--
Laurent
Received on Sun Jun 02 2019 - 08:54:07 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC