diff options
Diffstat (limited to 'sysdeps/mach/hurd/getgroups.c')
-rw-r--r-- | sysdeps/mach/hurd/getgroups.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/getgroups.c b/sysdeps/mach/hurd/getgroups.c index 5f036f8191..6b59d4a483 100644 --- a/sysdeps/mach/hurd/getgroups.c +++ b/sysdeps/mach/hurd/getgroups.c @@ -31,6 +31,7 @@ __getgroups (int n, gid_t *gidset) if (n < 0) return __hurd_fail (EINVAL); +retry: crit = _hurd_critical_section_lock (); __mutex_lock (&_hurd_id.lock); @@ -38,6 +39,9 @@ __getgroups (int n, gid_t *gidset) { __mutex_unlock (&_hurd_id.lock); _hurd_critical_section_unlock (crit); + if (err == EINTR) + /* Got a signal while inside an RPC of the critical section, retry again */ + goto retry; return __hurd_fail (err); } |