aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-10-30 18:35:09 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-10-30 18:35:09 +0000
commit6819e08663b3adf8f5ce4ed7dbc01aaba814e7fd (patch)
tree0955b6c60891cade84c39036eff9db985f356f38
parent2c32441420fcb5c3ad12d44aea7fea11669a1d08 (diff)
downloadfetchmail-6819e08663b3adf8f5ce4ed7dbc01aaba814e7fd.tar.gz
fetchmail-6819e08663b3adf8f5ce4ed7dbc01aaba814e7fd.tar.bz2
fetchmail-6819e08663b3adf8f5ce4ed7dbc01aaba814e7fd.zip
Detect error if lock file cannot be created.
svn path=/trunk/; revision=4375
-rw-r--r--NEWS2
-rw-r--r--lock.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6baaa633..b5203875 100644
--- 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 f29129d1..8a47703a 100644
--- 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;