From 4e475032328d5fdaead5daaf6a00a46979cabf6e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 12 May 2001 05:08:15 +0000 Subject: SA_RESTART and portability fixes. svn path=/trunk/; revision=3301 --- NEWS | 4 ++++ daemon.c | 8 +++++++- lock.c | 3 +++ odmr.c | 3 +++ socket.c | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 093aa96e..0293685f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) +* GCC warning cleanups from ahaas@neosoft.com. +* Plug another hole that was letting zombies through. +* SA_RESDTART portability fix for SunOS. + fetchmail-5.8.2 (Tue May 8 17:07:53 EDT 2001), 20481 lines: * HH's patches fixing Debian bug #90966 and addressing Debian bug #92554. diff --git a/daemon.c b/daemon.c index 89f733ac..eaedc1cf 100644 --- a/daemon.c +++ b/daemon.c @@ -90,10 +90,13 @@ void deal_with_sigchld(void) memset (&sa_new, 0, sizeof sa_new); sigemptyset (&sa_new.sa_mask); - sa_new.sa_handler = SIG_IGN; + /* sa_new.sa_handler = SIG_IGN; pointless */ /* set up to catch child process termination signals */ sa_new.sa_handler = sigchld_handler; +#ifdef SA_RESTART /* SunOS 4.1 portability hack */ + sa_new.sa_flags = SA_RESTART; +#endif sigaction (SIGCHLD, &sa_new, NULL); #if defined(SIGPWR) sigaction (SIGPWR, &sa_new, NULL); @@ -127,6 +130,9 @@ daemonize (const char *logfile, void (*termhook)(int)) memset (&sa_new, 0, sizeof sa_new); sigemptyset (&sa_new.sa_mask); sa_new.sa_handler = SIG_IGN; +#ifdef SA_RESTART /* SunOS 4.1 portability hack */ + sa_new.sa_flags = SA_RESTART; +#endif #endif /* HAVE_SIGACTION */ #ifdef SIGTTOU #ifndef HAVE_SIGACTION diff --git a/lock.c b/lock.c index 35abade1..379eba86 100644 --- a/lock.c +++ b/lock.c @@ -6,6 +6,9 @@ #include "config.h" #include +#ifdef HAVE_STRING_H +#include /* strcat() */ +#endif #if defined(STDC_HEADERS) #include #endif diff --git a/odmr.c b/odmr.c index c712ccb8..bc694083 100644 --- a/odmr.c +++ b/odmr.c @@ -9,6 +9,9 @@ #include #include #include +#ifdef HAVE_STRING_H /* strcat() */ +#include +#endif #ifdef HAVE_NET_SOCKET_H /* BeOS needs this */ #include #endif diff --git a/socket.c b/socket.c index 568f598a..d96743c8 100644 --- a/socket.c +++ b/socket.c @@ -9,6 +9,7 @@ #include #include #include +#include /* isspace() */ #ifdef HAVE_MEMORY_H #include #endif /* HAVE_MEMORY_H */ -- cgit v1.2.3