]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Revert "libmount: do not check for EAGAIN after flock()"
authorKarel Zak <kzak@redhat.com>
Fri, 18 Feb 2011 09:53:50 +0000 (10:53 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 18 Feb 2011 09:53:50 +0000 (10:53 +0100)
 Linux is not 100% POSIX compatible in this area...
 strace: "flock(3, LOCK_EX|LOCK_NB)   = -1 EAGAIN (Resource temporarily unavailable)"

This reverts commit 78d8c28f746bcc8d4e642c39669d8e58dea8d029.

shlibs/mount/src/tab_update.c

index 6b7b4beffc1497580db0c8346442c18ceb0ed818..5373e2fa20b6eaf665e94300040b87c83d57c3df 100644 (file)
@@ -619,7 +619,7 @@ static int utab_lock(const char *filename)
 
        while (flock(fd, LOCK_EX) < 0) {
                int errsv;
-               if (errno == EINTR)
+               if ((errno == EAGAIN) || (errno == EINTR))
                        continue;
                errsv = errno;
                close(fd);