[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-lock.c, 1.24,
1.25
cras at dovecot.org
cras at dovecot.org
Sun Apr 9 20:27:25 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv4820
Modified Files:
mbox-lock.c
Log Message:
fcntl locking: Don't print error if we're only trying to lock (instead of
waiting) and it failed.
Index: mbox-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-lock.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mbox-lock.c 1 Apr 2006 09:15:45 -0000 1.24
+++ mbox-lock.c 9 Apr 2006 17:27:22 -0000 1.25
@@ -391,6 +391,11 @@
while (fcntl(ctx->mbox->mbox_fd, wait_type, &fl) < 0) {
if (errno != EINTR) {
+ if ((errno == EACCES || errno == EAGAIN) &&
+ wait_type == F_SETLK) {
+ /* non-blocking lock trying failed */
+ return 0;
+ }
mbox_set_syscall_error(ctx->mbox, "fcntl()");
alarm(0);
return -1;
More information about the dovecot-cvs
mailing list