]> Pileus Git - ~andy/fetchmail/blobdiff - daemon.c
Attempt merging from 6.3.24.
[~andy/fetchmail] / daemon.c
index 696d533268eaa2bd2b2aa03362ef5006fbdcb8b0..8f39e86cfe48f18b1c9ed0e86a0039e26258f00f 100644 (file)
--- a/daemon.c
+++ b/daemon.c
 #include <signal.h>
 #include <string.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
-#endif
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#else /* !HAVE_FCNTL_H */
-#ifdef HAVE_SYS_FCNTL_H
-#include <sys/fcntl.h>
-#endif /* HAVE_SYS_FCNTL_H */
-#endif /* !HAVE_FCNTL_H */
 #include <sys/stat.h>  /* get umask(2) prototyped */
 
 #include <unistd.h>
 #include "fetchmail.h"
 #include "tunable.h"
 
-static RETSIGTYPE
+static void
 sigchld_handler (int sig)
 /* process SIGCHLD to obtain the exit code of the terminating process */
 {
-#if    defined(HAVE_WAITPID)                           /* the POSIX way */
     int status;
 
     while (waitpid(-1, &status, WNOHANG) > 0)
        continue; /* swallow 'em up. */
-#elif  defined(HAVE_WAIT3)                             /* the BSD way */
-    pid_t pid;
-#if defined(HAVE_UNION_WAIT) && !defined(__FreeBSD__)
-    union wait status;
-#else
-    int status;
-#endif
-
-    while ((pid = wait3(&status, WNOHANG, 0)) > 0)
-       continue; /* swallow 'em up. */
-#else  /* Zooks! Nothing to do but wait(), and hope we don't block... */
-    int status;
-
-    wait(&status);
-#endif
     lastsig = SIGCHLD;
     (void)sig;
 }
 
-RETSIGTYPE null_signal_handler(int sig) { (void)sig; }
+void null_signal_handler(int sig) { (void)sig; }
 
 SIGHANDLERTYPE set_signal_handler(int sig, SIGHANDLERTYPE handler)
 /*