apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bray <Tim.B...@Sun.COM>
Subject Corrected: global_mutex on Solaris 10, does it actually work?
Date Fri, 03 Oct 2008 19:39:07 GMT
Correcting two errors in my original post, why don't I just copy &  
paste?

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, filename,   
APR_LOCK_DEFAULT,
				     pool);

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", NULL);

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


Mime
View raw message