apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel May" <dan...@spryware.com>
Subject RE: cross-process, named mutex
Date Wed, 16 Nov 2005 18:07:14 GMT
I modified the test case program globalmutexchild.c to demonstrate.  If
you run:

./globalmutexchild 5 1

The program will get the global mutex and wait for ever.  Next, run
another copy:

./globalmutexchild

This one should wait for on mutex until the first process is killed, it
works under Windows, but
not under Linux.

Under Windows, apr_global_mutex and apr_proc_mutex are one in the same,
under Linux they have different implementations.  I do not think
apr_global_mutex is doing anything with the name passed in.

I noticed in the test suite, testing of global mutex is #ifdef'd out, is
there a reason for this ?  When included the ./testall fails.

Daniel
 

-----Original Message-----
From: Aaron Bannert [mailto:aaron@clove.org] 
Sent: Tuesday, November 15, 2005 3:53 PM
To: Daniel May
Cc: Michael Vergoz; dev@apr.apache.org
Subject: Re: cross-process, named mutex

Could you post the code that is failing?

-aaron


On Nov 15, 2005, at 11:58 AM, Daniel May wrote:

> Neither  apr_proc_mutex or apr_global_mutex seem to work under Linux.

> I created a simple single instance case where I created a named mutex 
> in an test program and paused.  I started a second instance and I was 
> granted the mutex.
> The lock is not holding.




Mime
View raw message