summaryrefslogtreecommitdiff
path: root/support/rotatelogs.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/rotatelogs.c')
-rw-r--r--support/rotatelogs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/support/rotatelogs.c b/support/rotatelogs.c
index cf1eac1e..c2373f56 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;