]> Pileus Git - ~andy/fetchmail/commitdiff
Detect error if lock file cannot be created.
authorMatthias Andree <matthias.andree@gmx.de>
Sun, 30 Oct 2005 18:35:09 +0000 (18:35 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 30 Oct 2005 18:35:09 +0000 (18:35 -0000)
svn path=/trunk/; revision=4375

NEWS
lock.c

diff --git a/NEWS b/NEWS
index 6baaa633d740e64411993602a007f68e80090efd..b5203875dca93ec16264677341cbc7abb88f450c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -250,6 +250,8 @@ fetchmail 6.3.0 (not yet released officially):
 * Bury on_exit officially - the necessary code had been missing from 6.0.0,
   6.2.0, 6.2.5.  Matthias Andree
 * Exit with error if the lock file cannot be read.  Matthias Andree
+* Exit with error if the lock file cannot be created exclusively, this got
+  broken in a 6.2.6-pre, 6.2.5.2 and older were fine.  Matthias Andree
 
 # INTERNAL CHANGES
 * Switched to automake. Matthias Andree.
diff --git a/lock.c b/lock.c
index f29129d1b62e5bf59ce4bcdc61364acfdf3f3245..8a47703a538af7036c97aaca776e274633a3df20 100644 (file)
--- a/lock.c
+++ b/lock.c
@@ -123,6 +123,8 @@ void lock_or_die(void)
            }
            if (fsync(fd)) e = 1;
            if (close(fd)) e = 1;
+       } else {
+           e = 1;
        }
        if (e == 0) {
            lock_acquired = TRUE;