From d67d0b8f82a55d52c799aeb088a65927bc9aecf7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 7 Aug 1997 20:55:08 +0000 Subject: Interactive UNIX System V/386 Release 3.2 port. svn path=/trunk/; revision=1245 --- fetchmail.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index bf866a97..65c196b2 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -45,6 +45,10 @@ #define DROPDEAD 6 /* maximum bad socket opens */ +#ifndef ENETUNREACH +#define ENETUNREACH 128 /* Interactive doesn't know this */ +#endif /* ENETUNREACH */ + /* prototypes for internal functions */ static int load_params(int, char **, int); static void dump_params (struct query *); @@ -331,7 +335,8 @@ int main (int argc, char **argv) #ifdef HAVE_ATEXIT atexit(unlockit); -#else +#endif +#ifdef HAVE_ON_EXIT on_exit(unlockit, (char *)NULL); #endif } @@ -739,6 +744,10 @@ void termhook(int sig) if (!check_only) write_saved_lists(querylist, idfile); +#if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT) + unlockit(); +#endif + exit(successes ? PS_SUCCESS : querystatus); } -- cgit v1.2.3