httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1140226 - /httpd/httpd/trunk/support/rotatelogs.c
Date Mon, 27 Jun 2011 16:16:56 GMT
Author: jorton
Date: Mon Jun 27 16:16:56 2011
New Revision: 1140226

URL: http://svn.apache.org/viewvc?rev=1140226&view=rev
Log:
* support/rotatelogs.c (main): Exit with success on EOF.

Modified:
    httpd/httpd/trunk/support/rotatelogs.c

Modified: httpd/httpd/trunk/support/rotatelogs.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=1140226&r1=1140225&r2=1140226&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Mon Jun 27 16:16:56 2011
@@ -607,7 +607,10 @@ int main (int argc, const char * const a
     for (;;) {
         nRead = sizeof(buf);
         rv = apr_file_read(f_stdin, buf, &nRead);
-        if (rv != APR_SUCCESS) {
+        if (APR_STATUS_IS_EOF(rv)) {
+            break;
+        }
+        else if (rv != APR_SUCCESS) {
             exit(3);
         }
         checkRotate(&config, &status);
@@ -659,6 +662,6 @@ int main (int argc, const char * const a
             }
         }
     }
-    /* Of course we never, but prevent compiler warnings */
-    return 0;
+
+    return 0; /* reached only at stdin EOF. */
 }



Mime
View raw message