[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.19,1.20
cras at dovecot.org
cras at dovecot.org
Mon Oct 11 16:05:26 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv8809/lib
Modified Files:
file-dotlock.c
Log Message:
Check that dotlock PID exists even if we don't do stale lock timeouting.
Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- file-dotlock.c 10 Oct 2004 14:39:05 -0000 1.19
+++ file-dotlock.c 11 Oct 2004 13:05:24 -0000 1.20
@@ -98,11 +98,6 @@
return 1;
}
- if (lock_info->stale_timeout == 0) {
- /* no change checking */
- return 0;
- }
-
if (lock_info->ino != st.st_ino ||
!CMP_DEV_T(lock_info->dev, st.st_dev) ||
lock_info->ctime != st.st_ctime ||
@@ -134,7 +129,6 @@
lock_info->have_pid = pid != -1;
}
- /* re-read the PID every time, because */
if (lock_info->have_pid) {
/* we've local PID. Check if it exists. */
if (kill(pid, 0) == 0 || errno != ESRCH)
@@ -148,6 +142,11 @@
return 1;
}
+ if (lock_info->stale_timeout == 0) {
+ /* no change checking */
+ return 0;
+ }
+
if (lock_info->last_change != now) {
if (stat(lock_info->path, &st) < 0) {
if (errno == ENOENT) {
More information about the dovecot-cvs
mailing list