Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 87939 invoked from network); 3 Oct 2008 18:51:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Oct 2008 18:51:16 -0000 Received: (qmail 11184 invoked by uid 500); 3 Oct 2008 18:51:14 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 11122 invoked by uid 500); 3 Oct 2008 18:51:14 -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 11111 invoked by uid 99); 3 Oct 2008 18:51:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 11:51:14 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 18:50:10 +0000 Received: from fe-amer-10.sun.com ([192.18.109.80]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m93IoZZB023036 for ; Fri, 3 Oct 2008 18:50:35 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K8600H01ERVII00@mail-amer.sun.com> (original mail from Tim.Bray@Sun.COM) for dev@apr.apache.org; Fri, 03 Oct 2008 12:50:35 -0600 (MDT) Received: from [192.168.1.122] (d64-180-74-24.bchsia.telus.net [64.180.74.24]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K86003AMF028C20@mail-amer.sun.com> for dev@apr.apache.org; Fri, 03 Oct 2008 12:50:27 -0600 (MDT) Date: Fri, 03 Oct 2008 11:50:25 -0700 From: Tim Bray Subject: global_mutex on Solaris 10, does it actually work? Sender: Tim.Bray@Sun.COM To: APR Development List Message-id: <1B5C099F-3516-4445-898F-BB02590948F7@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.929.2) Content-type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Content-transfer-encoding: 7BIT X-Virus-Checked: Checked by ClamAV on apache.org 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, 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"); 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