Handle EBUSY errors from the optional-extra advisory file locking.

This commit is contained in:
Nathan Scott
2004-04-30 06:15:26 +00:00
parent 5868405dce
commit f5ee322c18
+2 -1
View 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));