From: Joe Orton Date: Thu, 17 Apr 2014 09:00:36 +0000 (+0000) Subject: Merge r1587255 from trunk: X-Git-Tag: 2.4.10~330 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94e2006de1cf120cb1a5dba7c18ae8f7a1fc8586;p=apache Merge r1587255 from trunk: * support/rotatelogs.c (main): Prevent creation of zombies from post-rotate programs. Reviewed by: druggeri, ylavic, covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1588175 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f6f725f6a5..61beda093a 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.10 + *) rotatelogs: Avoid creation of zombie processes when -p is used on + Unix platforms. [Joe Orton] + *) mod_authnz_fcgi: New module to enable FastCGI authorizer applications to authenticate and/or authorize clients. [Jeff Trawick] diff --git a/support/rotatelogs.c b/support/rotatelogs.c index cf1eac1ea8..c2373f56b0 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 @@ -557,6 +558,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;