apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apr/misc/unix start.c
Date Tue, 28 Nov 2000 14:40:18 GMT
On Tue, 28 Nov 2000, Greg Ames wrote:

> 
> 
> rbb@locus.apache.org wrote:
> > 
> [...]
> > 
> >   +    if (initialized) {
> >   +        return APR_SUCCESS;
> >   +    }
> >   +    initialized++;
> >   +
> 
> Oooops...this only counts to 1.  Works OK when there's at most 2 APR
> users, but what if there are 3?  We don't want to destroy locks when the
> second user goes away.  How about:
> 
>   if (initialized++) {
>       return APR_SUCCESS;

You're right.  I wrote this section before even thinking about the
termination, and didn't check it after I did the terminating stuff.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message