apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bray <Tim.B...@Sun.COM>
Subject global_mutex on Solaris 10, does it actually work?
Date Fri, 03 Oct 2008 18:50:25 GMT
So, there's this file I want to update, suppose its name is in the  
variable "filename", so I go

     status = apr_global_mutex_create(&mutex, mutex_file,  

And on Solaris 10, this fails with EEXIST, i.e. strerror says "File  
exists".  (This doesn't happen on OS X).  Well, yeah, it exists, I  
want to update it, that's what the mutex is for, sigh.  So I created  
another filename called

   mutex_file = apr_pstrcat(pool, filename, ".mutex");

and locked that, which worked until the first time another process  
wanted to wait on the mutex, and it couldn't create the mutex to wait  
on it because the file existed.  So, I'm confused... how can I get an  
apr_global_mutex_t to wait on in this scenario?

Pardon the stupidity. -T

View raw message