On Sun, Jan 26, 2025 at 12:06 AM Diego Nieto Cid <dnie...@gmail.com> wrote: > Hello,
Hello, > However, when running in GNU/Hurd, the output is a bit different: > > strerror_r: Error in unknown error system: FFFFFFFF So for some background: on the Hurd, Unix errors are unified with Mach error codes (see gnumach:include/mach/error.h and glibc:sysdeps/mach/hurd/bits/errno.h). This unification is what makes it possible to e.g. "return ENOENT" from a MIG routine (where a Mach error code is expected), or to propagate the errors returned by Mach out of Unix-level APIs (with only minimal mapping). All Mach codes are also accessible with Unix-style ESMTH names, e.g. EMACH_SEND_TIMED_OUT is the same as MACH_SEND_TIMED_OUT -- though I don't know if anything uses this. Mach errors are basically tuples of (system, subsystem, specific code). strerror tries to parse these out of the error code, and at least report the system/subsystem even if it didn't have the definition for the specific code at glibc build time, see glibc:sysdeps/mach/_strerror.c. Of course it's not like we're adding new error codes every day, so this is kind of redundant. Sergey