]> granicus.if.org Git - apache/commitdiff
Merge 1409726 from trunk:
authorJoe Orton <jorton@apache.org>
Mon, 3 Dec 2012 09:54:13 +0000 (09:54 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 3 Dec 2012 09:54:13 +0000 (09:54 +0000)
* 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
support/rotatelogs.c

diff --git a/CHANGES b/CHANGES
index 684c60e7deb6cc0c77dd8aa90845da61f627876e..e0b451fa6a185d5771d61ac71dd58480ecfb46ae 100644 (file)
--- 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 <jkaluza redhat.com>,
      Jeff Trawick]
index 81bd950fc2e28cab2c1622b747d0f0ce1e285318..96c40e35d2c718321c6455edea02eef7b837502d 100644 (file)
@@ -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;
     }