Skip to content

Commit fe03ef5

Browse files
committed
* 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
1 parent 65624ca commit fe03ef5

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

support/rotatelogs.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,10 @@ int main (int argc, const char * const argv[])
607607
for (;;) {
608608
nRead = sizeof(buf);
609609
rv = apr_file_read(f_stdin, buf, &nRead);
610-
if (rv != APR_SUCCESS) {
610+
if (APR_STATUS_IS_EOF(rv)) {
611+
break;
612+
}
613+
else if (rv != APR_SUCCESS) {
611614
exit(3);
612615
}
613616
checkRotate(&config, &status);
@@ -659,6 +662,6 @@ int main (int argc, const char * const argv[])
659662
}
660663
}
661664
}
662-
/* Of course we never, but prevent compiler warnings */
663-
return 0;
665+
666+
return 0; /* reached only at stdin EOF. */
664667
}

0 commit comments

Comments
 (0)