]> granicus.if.org Git - apache/commitdiff
* support/rotatelogs.c (main): Prevent creation of zombies from
authorJoe Orton <jorton@apache.org>
Mon, 14 Apr 2014 16:38:30 +0000 (16:38 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 14 Apr 2014 16:38:30 +0000 (16:38 +0000)
  post-rotate programs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587255 13f79535-47bb-0310-9956-ffa450edef68

support/rotatelogs.c

index e4953963fb0997ed424b89f773f6b19dda1cb9eb..83707d5dec20739f8755cf8f6a209cd1c96c7655 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
@@ -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;