]> granicus.if.org Git - apache/commitdiff
Merge r1587255 from trunk:
authorJoe Orton <jorton@apache.org>
Thu, 17 Apr 2014 09:00:36 +0000 (09:00 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 17 Apr 2014 09:00:36 +0000 (09:00 +0000)
* 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

CHANGES
support/rotatelogs.c

diff --git a/CHANGES b/CHANGES
index f6f725f6a51817198f99bad90eddacd7dc46e483..61beda093aea2c7504e376f32ded8372261210ac 100644 (file)
--- 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]
index cf1eac1ea8076cb5d821a06f90c5334c1fcbb3cd..c2373f56b01e2df8af878f227126c7fa25379655 100644 (file)
@@ -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;