Jim Jagielski <[EMAIL PROTECTED]> writes:

>     AcceptMutex  fcntl|flock|sysv|pthread|default...
> 
> As far as someone choosing a method not supported on that platform,
> then an error-no-start or error-choose-default would be the 2
> options on how Apache/APR should handle that. I think I'd prefer the
> 'choose-default' reaction...

I think I'd rather see it fail.

If an app wants to back down to the default without informing the user
that they picked an invalid mechanism then it is just an extra couple
of lines.

rv = apr_lock_create(aaa, APR_MUTEX_SYSVSEM, bbb);
if (APR_STATUS_IS_ENOTIMPL(rv)) {
    rv = apr_lock_create(aaa, APR_MUTEX_DEFAULT, bbb);
}
if (rv != APR_SUCCESS) {
    /* handle failure to create a lock */
}

If an app doesn't want to back down to the default ('cause it *is* a
configuration error) then existing code works fine.

If APR has the code to back down to the default then there has to be a 
special return code from apr_lock_create() to indicate that the app
got the default and/or some other way for the app to find out that it
didn't get what it asked for.

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Reply via email to