apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: apr_global_mutex_child_init & mod_watch
Date Mon, 08 Sep 2003 11:32:48 GMT
Anthony Howe wrote:

>> flock is used on FreeBSD by default...  flock requires that chmod be 
>> done on the lock in the child init
> 
> 
> As an aside, why is flock() used on FreeBSD?

historical reasons?

>> at Apache 2.0.48-dev, you have to do the chmod() on the lock file, 
>> like mod_ssl does in that branch
> 
> 
> OK. Is there an API that returns what the APR_LOCK_DEFAULT mutex will be?

not exactly, but there is an API that will give you the info you need: 
apr_proc_mutex_name(); pass it a mutex and it returns a string such as 
"sysvsem", "flock", "fcntl", etc. to indicate what mechanism is in use

alternatively, if APR_USE_FLOCK_SERIALIZE is defined in apr.h then the 
default is flock
> That would be the ideal solution, but I'm not sure I can wait until 
> 2.0.48. Plus not everyone upgrades when they should, so I need a work 
> around.

probably won't be in 2.0.48 anyway

> BTW are there any version macros in Apache 2 or the APR like:
> 
>     APACHE_VERSION_MAJOR
>     APACHE_VERSION_MINOR

see ap_release.h for similar

>     APR_VERSION_MAJOR
>     APR_VERSION_MINOR

see apr_version.h for similar



Mime
View raw message