about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/seteuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/seteuid.c')
-rw-r--r--sysdeps/mach/hurd/seteuid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/seteuid.c b/sysdeps/mach/hurd/seteuid.c
index 637015cc22..97eb22c6b7 100644
--- a/sysdeps/mach/hurd/seteuid.c
+++ b/sysdeps/mach/hurd/seteuid.c
@@ -29,6 +29,7 @@ seteuid (uid_t uid)
   auth_t newauth;
   error_t err;
 
+retry:
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_id.lock);
   err = _hurd_check_ids ();
@@ -55,6 +56,9 @@ seteuid (uid_t uid)
     }
   __mutex_unlock (&_hurd_id.lock);
   HURD_CRITICAL_END;
+  if (err == EINTR)
+    /* Got a signal while inside an RPC of the critical section, retry again */
+    goto retry;
 
   if (err)
     return __hurd_fail (err);