diff options
Diffstat (limited to 'shlibs/mount/src')
-rw-r--r-- | shlibs/mount/src/tab_update.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shlibs/mount/src/tab_update.c b/shlibs/mount/src/tab_update.c index d66b64f94..2084b5861 100644 --- a/shlibs/mount/src/tab_update.c +++ b/shlibs/mount/src/tab_update.c @@ -616,8 +616,12 @@ static int utab_lock(const char *filename) if (fd < 0) return -errno; - if (flock(fd, LOCK_EX)) { - int errsv = errno; + + while (flock(fd, LOCK_EX) < 0) { + int errsv; + if ((errno == EAGAIN) || (errno == EINTR)) + continue; + errsv = errno; close(fd); return -errsv; } |