httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: svn commit: r916377 - in /httpd/httpd/trunk: CHANGES docs/manual/programs/rotatelogs.xml support/rotatelogs.c
Date Mon, 20 Jun 2011 10:43:33 GMT
Dredging up an change from last year:

On Thu, Feb 25, 2010 at 06:00:43PM -0000, poirier@apache.org wrote:
> Author: poirier
> Date: Thu Feb 25 18:00:42 2010
> New Revision: 916377
> 
> URL: http://svn.apache.org/viewvc?rev=916377&view=rev
> Log:
> Add -L option to create a hard link to the current log file.  
...
> @@ -351,6 +354,20 @@
>          status->pfile_prev = NULL;
>      }
>      status->nMessCount = 0;
> +    if (config->linkfile) {
> +        apr_file_remove(config->linkfile, status->pfile);
> +        if (config->verbose) {
> +            fprintf(stderr,"Linking %s to %s\n", status->filename, config->linkfile);
> +        }
> +        rv = apr_file_link(status->filename, config->linkfile);

This snippet gets invoked even in the case where opening a new log file 
fails, and the old one is truncated and re-used; it will then fail and 
break the link, I think.  -L is kind of redundant with the more general 
-p mode just added - is it worth keeping?

http://svn.apache.org/viewvc?view=revision&revision=1137590

Regards, Joe

Mime
View raw message