]> Pileus Git - ~andy/fetchmail/commitdiff
Minor update.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 23 Jul 2000 03:40:34 +0000 (03:40 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 23 Jul 2000 03:40:34 +0000 (03:40 -0000)
svn path=/trunk/; revision=2927

COPYING
Makefile.in
NEWS
configure.in
daemon.c
fetchmail.c
fetchmailconf
sink.c

diff --git a/COPYING b/COPYING
index a234e13b508eacd2824762751da2bae5ca7dbb01..8ae894ac40e540dfaeedd250e64783ab150050bb 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -5,7 +5,7 @@ retained for the purpose of protecting free redistribution of source.
 The MD5 support is copyright by RSA Data Security, Inc.  See the header
 comment of the md5.c module for license terms.
 
-                       NO-VIRUS CLAUSE
+                       NO-INFECTION CLAUSE
 
 The intent of this license is to protect free redistribution and reuse of the
 source of the licensed distribution, not to prejudice the authorship
index 2de1f26d05eac10c438da6b93e325812b5e5bb23..0f08dad9c65c7cdfa6dab63d2f471d2f5ccae063 100644 (file)
@@ -4,7 +4,7 @@
 # So just uncomment all the lines marked QNX.
 
 PACKAGE = fetchmail
-VERSION = 5.4.3
+VERSION = 5.4.4
 
 SUBDIRS = @INTLSUB@ @POSUB@  
 
@@ -18,7 +18,7 @@ CC = @CC@
 CFLAGS = @CFLAGS@
 # CFLAGS =  -g2 -5     # QNX
 LDFLAGS = @LDFLAGS@
-# LDFLAGS =  -g2 -5    # QNX
+# LDFLAGS =  -g2 -5 -N64k      # QNX
 LEX = @LEX@
 LEXFLAGS=
 YACC = @YACC@
diff --git a/NEWS b/NEWS
index 76c6d393eb5ed7456596803dd935274cde8b1b2e..e9f6659c9e948a14efc1d741cc53964b616d4cec 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,10 @@
 
 (The `lines' figures total .c, .h, .l, and .y files under version control.)
 
-fetchmail-5.4.2 (Sun Jul  2 14:24:28 EDT 2000), 19080 lines:
+* Guenther H. Leber's fix to show expunge parameters for POP3 in fetchmail -V.
+* Richard Gooch's fixes to use sigation(2) in sink.c and daemon.c
+
+fetchmail-5.4.3 (Sun Jul  2 14:24:28 EDT 2000), 19080 lines:
 
 * Fixed Debian bug #63667, fetchmailconf: doesn't write .fetchmailrc properly.
 * RFC2177 IDLE should now be done even when there are no messages.
index 52a06f954dea9107e0c332c35ef5932f4209edac..13094fd93acd18a3642013afc4216bc150891bc1 100644 (file)
@@ -141,7 +141,7 @@ AC_SUBST(EXTRAOBJ)
 AC_CHECK_FUNCS(tcsetattr stty setsid geteuid seteuid gethostbyname \
   res_search herror strrchr strerror setlinebuf syslog \
   snprintf vprintf vsnprintf vsyslog \
-  atexit inet_aton strftime setrlimit socketpair sigprocmask)
+  atexit inet_aton strftime setrlimit socketpair sigprocmask sigaction)
 
 # Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
 # and breaks gethostbyname(2).  It's better to use the bind stuff in the C
index 64b1c90ddcf066bc9ce253484638658c6464f5fa..a12f2c70b4f7c890f04d14604c138f64817412e2 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -88,6 +88,9 @@ daemonize (const char *logfile, void (*termhook)(int))
   int fd;
   pid_t childpid;
   RETSIGTYPE sigchld_handler(int);
+#ifdef HAVE_SIGACTION
+  struct sigaction sa_new;
+#endif /* HAVE_SIGACTION */
 
   /* if we are started by init (process 1) via /etc/inittab we needn't 
      bother to detach from our process group context */
@@ -96,14 +99,31 @@ daemonize (const char *logfile, void (*termhook)(int))
     goto nottyDetach;
 
   /* Ignore BSD terminal stop signals */
+#ifdef HAVE_SIGACTION
+  memset (&sa_new, 0, sizeof sa_new);
+  sigemptyset (&sa_new.sa_mask);
+  sa_new.sa_handler = SIG_IGN;
+#endif /* HAVE_SIGACTION */
 #ifdef         SIGTTOU
+#ifndef HAVE_SIGACTION
   signal(SIGTTOU, SIG_IGN);
+#else
+  sigaction (SIGTTOU, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
 #endif
 #ifdef SIGTTIN
+#ifndef HAVE_SIGACTION
   signal(SIGTTIN, SIG_IGN);
+#else
+  sigaction (SIGTTIN, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
 #endif
 #ifdef SIGTSTP
+#ifndef HAVE_SIGACTION
   signal(SIGTSTP, SIG_IGN);
+#else
+  sigaction (SIGTSTP, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
 #endif
 
   /* In case we were not started in the background, fork and let
@@ -144,7 +164,11 @@ daemonize (const char *logfile, void (*termhook)(int))
 #endif
   
   /* lose controlling tty */
+#ifndef HAVE_SIGACTION
   signal(SIGHUP, SIG_IGN);
+#else
+  sigaction (SIGHUP, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
   if ((childpid = fork()) < 0) {
     report(stderr, "fork (%)\n", strerror(errno));
     return(PS_IOERR);
@@ -197,9 +221,18 @@ nottyDetach:
 #endif
 
   /* set up to catch child process termination signals */ 
+#ifndef HAVE_SIGACTION
   signal(SIGCHLD, sigchld_handler); 
+#else
+  sa_new.sa_handler = sigchld_handler;
+  sigaction (SIGCHLD, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
 #if defined(SIGPWR)
+#ifndef HAVE_SIGACTION
   signal(SIGPWR, sigchld_handler); 
+#else
+  sigaction (SIGPWR, &sa_new, NULL);
+#endif /* HAVE_SIGACTION */
 #endif
 
   return(0);
index b1cf9cb8d9d0ac56aab308db6e63cf8b9507ae9c..33041b9d441fcc83def88d3facc6db4bf1b689c4 100644 (file)
@@ -1612,7 +1612,7 @@ static void dump_params (struct runctl *runp,
                    printf(_("  SMTP message batch limit is %d.\n"), ctl->batchlimit);
                else if (outlevel >= O_VERBOSE)
                    printf(_("  No SMTP message batch limit (--batchlimit 0).\n"));
-               if (ctl->server.protocol == P_IMAP)
+               if (ctl->server.protocol != P_ETRN)
                {
                    if (NUM_NONZERO(ctl->expunge))
                        printf(_("  Deletion interval between expunges forced to %d (--expunge %d).\n"), ctl->expunge, ctl->expunge);
index 7f3778f7becd4585c64c69095efc12a3c7145690..16fc806c713de2fdcdc727fab121ad829a40c346 100755 (executable)
@@ -1522,8 +1522,8 @@ class UserEdit(Frame, MyWidget):
                      self.fetchlimit, '30').pack(side=TOP, fill=X)
             LabeledEntry(limwin, 'Max messages to forward per poll:',
                      self.batchlimit, '30').pack(side=TOP, fill=X)
-            if self.parent.server.protocol in ('IMAP', 'IMAP-K4', 'IMAP-GSS'):
-                LabeledEntry(limwin, 'Interval between expunges (IMAP):',
+            if self.parent.server.protocol != 'ETRN':
+                LabeledEntry(limwin, 'Interval between expunges:',
                              self.expunge, '30').pack(side=TOP, fill=X)
             Checkbutton(limwin, text="Idle after each poll (IMAP only)", 
                    variable=self.idle).pack(side=TOP, anchor=W)
diff --git a/sink.c b/sink.c
index 8c3d5f54a9393ca96d0bbad270aa7ec915276632..519fc2bd67a981278ce8ca01ab25e75aa0127ccb 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -169,7 +169,11 @@ static int smtp_open(struct query *ctl)
 
 /* these are shared by open_sink and stuffline */
 static FILE *sinkfp;
+#ifndef HAVE_SIGACTION
 static RETSIGTYPE (*sigchld)(int);
+#else
+static struct sigaction sa_old;
+#endif /* HAVE_SIGACTION */
 
 int stuffline(struct query *ctl, char *buf)
 /* ship a line to the given control block's output sink (SMTP server or MDA) */
@@ -488,6 +492,9 @@ int open_sink(struct query *ctl, struct msgblk *msg,
 /* set up sinkfp to be an input sink we can ship a message to */
 {
     struct     idlist *idp;
+#ifdef HAVE_SIGACTION
+    struct      sigaction sa_new;
+#endif /* HAVE_SIGACTION */
 
     *bad_addresses = *good_addresses = 0;
 
@@ -688,7 +695,14 @@ int open_sink(struct query *ctl, struct msgblk *msg,
            return(PS_IOERR);
        }
 
+#ifndef HAVE_SIGACTION
        sigchld = signal(SIGCHLD, SIG_DFL);
+#else
+       memset (&sa_new, 0, sizeof sa_new);
+       sigemptyset (&sa_new.sa_mask);
+       sa_new.sa_handler = SIG_DFL;
+       sigaction (SIGCHLD, &sa_new, &sa_old);
+#endif /* HAVE_SIGACTION */
     }
     else /* forward to an SMTP or LMTP listener */
     {
@@ -873,7 +887,11 @@ void release_sink(struct query *ctl)
            pclose(sinkfp);
            sinkfp = (FILE *)NULL;
        }
+#ifndef HAVE_SIGACTION
        signal(SIGCHLD, sigchld);
+#else
+       sigaction (SIGCHLD, &sa_old, NULL);
+#endif /* HAVE_SIGACTION */
     }
 }
 
@@ -892,7 +910,11 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
        }
        else
            rc = 0;
+#ifndef HAVE_SIGACTION
        signal(SIGCHLD, sigchld);
+#else
+       sigaction (SIGCHLD, &sa_old, NULL);
+#endif /* HAVE_SIGACTION */
        if (rc)
        {
            report(stderr,