httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <>
Subject Re: Balancers (file based SHMs) and restart issue (Windows only?)
Date Mon, 14 Sep 2015 14:15:35 GMT
On Mon, Sep 14, 2015 at 4:07 PM, Eric Covener <> wrote:
> On Mon, Sep 14, 2015 at 9:45 AM, Yann Ylavic <> wrote:
>> PR 58024 looks hard(er) to resolve (details there)...
>> It seems that DeleteFile() always fails when some file mapping exists
>> on the file, which also prevents "deletion when the last handle to the
>> file is closed".
>> So currently (mod_slotmem_shm on trunk), the SHM files by generation
>> leak on the filesystem since they are never removed (successfully).
>> The only thing I can think of now is to use FILE_FLAG_DELETE_ON_CLOSE
>> flagged files, but it's not available for SHM files in APR, so we'd
>> have to cook our own slotmem_shm_create() (a wrapper with Windows
>> specific code) which would apr_os_shm_put() a native SHM from a
>> apr_file_open(..., APR_FOPEN_DELONCLOSE) file.
>> Any better idea?
> No better ideas, but for this same reason mod_disk_cache is quite
> busted on Windows -- w/ and w/o lock files turned on.

So maybe we need a general ap_shm_create() wrapper usable wherever it may help?
At least until a new APR_SHM_DELONCLOSE flag is added to apr_shm_create_ex()?

View raw message