altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-rotatelogs-zombie.patch

008793
diff --git a/support/rotatelogs.c b/support/rotatelogs.c
008793
index 55c4406..f4c6490 100644
008793
--- a/support/rotatelogs.c
008793
+++ b/support/rotatelogs.c
008793
@@ -49,6 +49,7 @@
008793
 #include "apr_time.h"
008793
 #include "apr_getopt.h"
008793
 #include "apr_thread_proc.h"
008793
+#include "apr_signal.h"
008793
 #if APR_FILES_AS_SOCKETS
008793
 #include "apr_poll.h"
008793
 #endif
008793
@@ -595,6 +596,10 @@ int main (int argc, const char * const argv[])
008793
             break;
008793
         case 'p':
008793
             config.postrotate_prog = opt_arg;
008793
+#ifdef SIGCHLD
008793
+            /* Prevent creation of zombies (on modern Unix systems). */
008793
+            apr_signal(SIGCHLD, SIG_IGN);
008793
+#endif
008793
             break;
008793
         case 'f':
008793
             config.force_open = 1;