From 2b551b017a3bedddff6e7f4ae1757e61adaaf3a5 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 3 Dec 2012 09:54:13 +0000 Subject: [PATCH] Merge 1409726 from trunk: * support/rotatelogs.c (post_rotate): Really omit the second arg when invoking a post-rotate program, rather than passing an empty arg. (Fixes to code match desired&documented behaviour.) Reviewed by: jorton, jim, sf git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1416406 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ support/rotatelogs.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 684c60e7de..e0b451fa6a 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.4.4 + *) rotatelogs: Omit the second argument for the first invocation of + a post-rotate program when -p is used, per the documentation. + [Joe Orton] + *) core: Functions to provide server load values: ap_get_sload() and ap_get_loadavg(). [Jim Jagielski, Jan Kaluza , Jeff Trawick] diff --git a/support/rotatelogs.c b/support/rotatelogs.c index 81bd950fc2..96c40e35d2 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -336,7 +336,7 @@ static void post_rotate(apr_pool_t *pool, struct logfile *newlog, argv[0] = config->postrotate_prog; argv[1] = newlog->name; - if (status->current.name) { + if (status->current.fd) { argv[2] = status->current.name; argv[3] = NULL; } -- 2.50.1