It is supposed to return an error code, not just -1.

Reported-by: Brent Baccala <[email protected]> 's Claude assistant
---
 sysdeps/mach/hurd/sigwait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach/hurd/sigwait.c
index eb00b025e6..76f7713637 100644
--- a/sysdeps/mach/hurd/sigwait.c
+++ b/sysdeps/mach/hurd/sigwait.c
@@ -27,7 +27,7 @@ __sigwait (const sigset_t *set, int *sig)
   ret = __sigtimedwait (set, NULL, NULL);
 
   if (ret < 0)
-    return -1;
+    return errno;
 
   if (!ret)
     return __hurd_fail(EAGAIN);
-- 
2.51.0


Reply via email to