[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.42,1.43

tss at dovecot.org tss at dovecot.org
Fri May 11 17:07:07 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv4838

Modified Files:
	file-dotlock.c 
Log Message:
Give a better error message if dotlock is deleted immediately under us (or
more likely an OS bug).



Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- file-dotlock.c	11 Apr 2007 11:24:49 -0000	1.42
+++ file-dotlock.c	11 May 2007 14:07:04 -0000	1.43
@@ -523,7 +523,12 @@
 	/* some NFS implementations may have used cached mtime in previous
 	   fstat() call. Check again to avoid "dotlock was modified" errors. */
 	if (stat(lock_path, &st) < 0) {
-		i_error("stat(%s) failed: %m", lock_path);
+		if (errno != ENOENT)
+			i_error("stat(%s) failed: %m", lock_path);
+		else {
+			i_error("dotlock %s was immediately deleted under us",
+				lock_path);
+		}
                 file_dotlock_free(dotlock);
 		t_pop();
 		return -1;



More information about the dovecot-cvs mailing list