Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 78290 invoked from network); 15 Nov 2005 19:59:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 19:59:29 -0000 Received: (qmail 92897 invoked by uid 500); 15 Nov 2005 19:59:27 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 92799 invoked by uid 500); 15 Nov 2005 19:59:26 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 92768 invoked by uid 99); 15 Nov 2005 19:59:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 11:59:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.167.157.234] (HELO mail.may.com) (66.167.157.234) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 11:59:17 -0800 Content-class: urn:content-classes:message Subject: RE: cross-process, named mutex MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Nov 2005 13:58:49 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Message-ID: <5638BB7F71ECE64081000912579CB2ED174666@prine.may.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: cross-process, named mutex thread-index: AcXp0h/CJ9vBAL8CQiK2JEpALE4hsQATFXxg From: "Daniel May" To: "Michael Vergoz" Cc: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. Daniel -----Original Message----- From: Michael Vergoz [mailto:mv@binarysec.com]=20 Sent: Tuesday, November 15, 2005 4:48 AM To: Daniel May Subject: Re: cross-process, named mutex hi, it's little difficult to make a mutex global in Apache. in normal case = you may create a shared map with apr_mmap_create() ... and store the = mutex in it with apr_proc_mutex(). now you can used the apr global mutex = api to do that with apr_global_mutex_create(). you may have a look at = the file srclib/apr/locks/unix/global_mutex.c and at = srclib/apr/test/testglobalmutex.c. - michael Le 15 nov. 05 =E0 05:35, Daniel May a =E9crit : > Is there any way under APR Linux to create a cross-process, named =20 > Mutex > ? Under Win32, I simply call CreateMutex() with a name. Do I have to > create a piece of shared mem and store the pthreads mutex ? > > Daniel May > > > > > >