summaryrefslogtreecommitdiff
path: root/hurd/hurdsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurdsock.c')
-rw-r--r--hurd/hurdsock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
index bb98a6b745..e9334ba78d 100644
--- a/hurd/hurdsock.c
+++ b/hurd/hurdsock.c
@@ -52,6 +52,7 @@ _hurd_socket_server (int domain, int dead)
return MACH_PORT_NULL;
}
+retry:
HURD_CRITICAL_BEGIN;
__mutex_lock (&lock);
@@ -102,6 +103,10 @@ _hurd_socket_server (int domain, int dead)
__mutex_unlock (&lock);
HURD_CRITICAL_END;
+ if (!server && errno == EINTR)
+ /* Got a signal while inside an RPC of the critical section, retry again */
+ goto retry;
+
return server;
}