httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: rotatelogs - Adding timeout for reading from stdin
Date Tue, 09 Jun 2009 16:02:32 GMT
Mladen Turk wrote:
>> Wouldn't it be better if we simply implement the mechanism to share
>> the same handle between the parent and child?
> Since the parent does not receive any access log hits how
> would that prevent it from holding that handle forever?

The parent's handle to the process would be the child's handle to the
process.  There would only be one rotatelogs process.

>> I'd leave rotatelogs alone, please.  Its design is not flawed.  But
>> I think Jim was working on something which would release the file
>> just as soon as its time is up, and that is useful across all of
>> the architectures, not windows specific.
> Using 1 second wait before reading from the stdin would give
> the required rotate resolution. In case of APR_TIMEUP it's
> just a continue in the for (;;) loop giving change to rotate
> logic to handle the files.
> For Windows we can use apr_file_pipe_timeout_set(f_stdin, ...
> Dunno if there's a bug in APR/win32, but you can actually always
> set a timeout on a apr_file_t unlike on unix where this
> is possible only if apr_file_t is a pipe.
> And I would certainly like to hear from Jim what he proposes
> for rotatelogs solution for holding the file handles in parent.

There should be no parent vs child question here.  The right fix is
one process, just as on unix.  Windows bubblegum and bailing wire is
the wrong fix.

View raw message