On 9/10/21 8:55 AM, Joe Orton wrote:
> On Fri, Sep 10, 2021 at 12:51:53AM -0000, yla...@apache.org wrote:
>> Author: ylavic
>> Date: Fri Sep 10 00:51:53 2021
>> New Revision: 1893204
>>
>> URL: http://svn.apache.org/viewvc?rev=1893204&view=rev
>> Log:
>> apr_file_setaside: don't blindly kill the old cleanup and file descriptor.
>>
>> There is no cleanup with APR_FOPEN_NOCLEANUP, so apr_pool_cleanup_kill() can
>> go in the !(old_file->flags & APR_FOPEN_NOCLEANUP) block.
>>
>> The file descriptor can't be invalidated either, the file may be split in
>> multiple buckets and setting aside one shouldn't invalidate the others.
> 
> Interesting.  So is the API claim that:
> 
>  * @remark After calling this function, old_file may not be used
> 
> not really correct, or needs to be weakened?

I think it is correct, for the reason you state below and the reason I 
mentioned,
but I guess we probably need to review in httpd land if we still use the 
old_file
afterwards e.g. when buckets have been split.

> 
> old_file is also modified/invalidated in the ->buffered case where 
> old_file->thlock is removed.
> 

Regards

RĂ¼diger

Reply via email to