about summary refs log tree commit homepage
path: root/mnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mnt.c')
-rw-r--r--mnt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mnt.c b/mnt.c
index 0de0bb9..ca4bdf8 100644
--- a/mnt.c
+++ b/mnt.c
@@ -122,6 +122,7 @@ skip:
 static void * init_once(void *ptr)
 {
         struct init_args *ia = ptr;
+        int err;
 
         CHECK(int, 0, pthread_mutex_lock(&by_dev_lock) );
         assert(by_dev == NULL &&
@@ -135,7 +136,10 @@ static void * init_once(void *ptr)
         CHECK(int, 0, pthread_cond_signal(&ia->cond));
         CHECK(int, 0, pthread_mutex_unlock(&ia->cond_lock));
 
-        mog_sleep(-1); /* wait for cancellation */
+        /* wait for cancellation, mog_sleep may return ENOMEM or EINTR */
+        do {
+                err = mog_sleep(-1);
+        } while (err == EINTR || err == ENOMEM);
         assert(0 && "init_once did not get cancelled");
         return NULL;
 }