From: Joe Orton Date: Mon, 27 Jun 2011 16:16:56 +0000 (+0000) Subject: * support/rotatelogs.c (main): Exit with success on EOF. X-Git-Tag: 2.3.13~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01792b69b7a3a149f4b9f66e5353b5f4b993e050;p=thirdparty%2Fapache%2Fhttpd.git * support/rotatelogs.c (main): Exit with success on EOF. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1140226 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/rotatelogs.c b/support/rotatelogs.c index 2f5271f9f48..a00bb635fa3 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -607,7 +607,10 @@ int main (int argc, const char * const argv[]) 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 argv[]) } } } - /* Of course we never, but prevent compiler warnings */ - return 0; + + return 0; /* reached only at stdin EOF. */ }