[PATCH v2] stdlib: Consolidate getentropy and adapt to POSIX 2024 semantics
Florian Weimer
fw@deneb.enyo.de
Sat Mar 29 11:14:48 GMT 2025
* Mark Harris:
> Is there a reason to not just return the kernel-provided errno when it
> is not EINTR (whether it is ENOSYS or EFAULT, or something
> unexpected), as the current implementation does? Glibc propagates
> EFAULT and Linux-specific errors from other POSIX-defined functions
> even though POSIX does not specifically list them.
If we pass through ENOSYS as an error code (which is hard to test for
in practice), I think we can pass through any other error code as
well. The process termination thing only makes sense if there's no
possibility of environmental errors at all (errors not related to how
the function is used at the call site).
More information about the Libc-alpha
mailing list