aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-10-30 18:11:15 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-10-30 18:11:15 +0000
commit6fae1ebc493bd2c9bb3c6be646f9c2de74329952 (patch)
treef93b6baae17c481b9dab38538c2dac7df8ba52f3
parent98ff8ea5f7d45b7beab07d5c7242e2f7dafcd26b (diff)
downloadfetchmail-6fae1ebc493bd2c9bb3c6be646f9c2de74329952.tar.gz
fetchmail-6fae1ebc493bd2c9bb3c6be646f9c2de74329952.tar.bz2
fetchmail-6fae1ebc493bd2c9bb3c6be646f9c2de74329952.zip
Bury on_exit() officially - hasn't worked since 6.0.0 or even longer.
svn path=/trunk/; revision=4373
-rw-r--r--NEWS2
-rw-r--r--fetchmail.c2
-rw-r--r--lock.c7
3 files changed, 3 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 4106e425..9a897bf8 100644
--- a/NEWS
+++ b/NEWS
@@ -247,6 +247,8 @@ fetchmail 6.3.0 (not yet released officially):
Matthias Andree
* Print an error message if multiple "defaults" records are found in the
configuration file. Matthias Andree
+* Bury on_exit officially - the necessary code had been missing from 6.0.0,
+ 6.2.0, 6.2.5. Matthias Andree
# INTERNAL CHANGES
* Switched to automake. Matthias Andree.
diff --git a/fetchmail.c b/fetchmail.c
index 5f442d54..3e6d1408 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1331,7 +1331,7 @@ static RETSIGTYPE terminate_run(int sig)
if (ctl->password)
memset(ctl->password, '\0', strlen(ctl->password));
-#if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT)
+#if !defined(HAVE_ATEXIT)
fm_lock_release();
#endif
diff --git a/lock.c b/lock.c
index b8dbc503..89bf896a 100644
--- a/lock.c
+++ b/lock.c
@@ -47,11 +47,7 @@ void lock_setup(void)
#undef FETCHMAIL_PIDFILE
}
-#ifdef HAVE_ON_EXIT
-static void unlockit(int n, void *p)
-#else
static void unlockit(void)
-#endif
/* must-do actions for exit (but we can't count on being able to do malloc) */
{
if (lockfile && lock_acquired)
@@ -64,9 +60,6 @@ void lock_dispose(void)
#ifdef HAVE_ATEXIT
atexit(unlockit);
#endif
-#ifdef HAVE_ON_EXIT
- on_exit(unlockit, (char *)NULL);
-#endif
}
int lock_state(void)