diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-05-08 20:25:25 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-05-08 20:25:25 +0000 |
commit | e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2 (patch) | |
tree | 8d9a6cc8d4d1f9190e8b3dbaed6f366c7f9cb11e /fetchmail.c | |
parent | 225b32b70c44288111f6229a61c0040e2f032082 (diff) | |
download | fetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.tar.gz fetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.tar.bz2 fetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.zip |
Improved configuration and compilation.
svn path=/trunk/; revision=985
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c index f94ba8ee..152b7f28 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -81,7 +81,11 @@ static void termhook(); /* forward declaration of exit hook */ RETSIGTYPE donothing(sig) int sig; {signal(sig, donothing); lastsig = sig;} +#ifdef HAVE_ATEXIT static void unlockit(void) +#else /* use on_exit(), e.g. on SunOS */ +static void unlockit(int n, void *p) +#endif /* must-do actions for exit (but we can't count on being able to do malloc) */ { unlink(lockfile); @@ -364,7 +368,12 @@ int main (int argc, char **argv) if (poll_interval) fprintf(lockfp," %d", poll_interval); fclose(lockfp); + +#ifdef HAVE_ATEXIT atexit(unlockit); +#else + on_exit(unlockit, (char *)NULL); +#endif } /* |