apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: Accept mutex
Date Fri, 22 Jun 2001 14:30:31 GMT
Jim Jagielski <jim@jaguNET.com> 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);
    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 | trawick@attglobal.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message