From: Joe Orton Date: Mon, 14 Apr 2014 16:38:30 +0000 (+0000) Subject: * support/rotatelogs.c (main): Prevent creation of zombies from X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fdef7eab4897d59ccbe868f49783abd8e7f234c;p=thirdparty%2Fapache%2Fhttpd.git * support/rotatelogs.c (main): Prevent creation of zombies from post-rotate programs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587255 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/rotatelogs.c b/support/rotatelogs.c index e4953963fb0..83707d5dec2 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -24,6 +24,7 @@ #include "apr_time.h" #include "apr_getopt.h" #include "apr_thread_proc.h" +#include "apr_signal.h" #if APR_FILES_AS_SOCKETS #include "apr_poll.h" #endif @@ -594,6 +595,10 @@ int main (int argc, const char * const argv[]) break; case 'p': config.postrotate_prog = opt_arg; +#ifdef SIGCHLD + /* Prevent creation of zombies (on modern Unix systems). */ + apr_signal(SIGCHLD, SIG_IGN); +#endif break; case 'f': config.force_open = 1;