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-Tag: 2.5.0-alpha~4309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7d63d4da700d56bcbb496f69717ef50f5430d1d;p=apache * 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 e4953963fb..83707d5dec 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;