Handle EBUSY errors from the optional-extra advisory file locking.
authorNathan Scott <nathans@sgi.com>
Fri, 30 Apr 2004 06:15:26 +0000 (06:15 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 30 Apr 2004 06:15:26 +0000 (06:15 +0000)
src/t_mtab.c

index 89c384ab8a00b6181707f6d957bc91972eb605b6..2d5df3782b0477fd7bf5a5640f627330d61b8f88 100644 (file)
@@ -135,7 +135,8 @@ lock_mtab (void) {
 
                if (j == 0) {
                        /* We made the link. Now claim the lock. */
-                       if (fcntl (fd, F_SETLK, &flock) == -1) {
+                       if (fcntl (fd, F_SETLK, &flock) == -1 &&
+                           errno != EBUSY) {
                                int errsv = errno;
                                printf(_("Can't lock lock file %s: %s\n"),
                                           mounted_lock, strerror (errsv));