Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 95839 invoked from network); 8 Sep 2003 11:33:11 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Sep 2003 11:33:11 -0000 Received: (qmail 52219 invoked by uid 500); 8 Sep 2003 11:33:07 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 52190 invoked by uid 500); 8 Sep 2003 11:33:06 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 52162 invoked from network); 8 Sep 2003 11:33:06 -0000 Message-ID: <3F5C68E0.9070207@attglobal.net> Date: Mon, 08 Sep 2003 07:32:48 -0400 From: Jeff Trawick Reply-To: trawick@attglobal.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anthony Howe CC: dev@apr.apache.org Subject: Re: apr_global_mutex_child_init & mod_watch References: <3F5B53C8.3010500@snert.com> <3F5B58B3.7040901@attglobal.net> <3F5B5E03.4010604@snert.com> <3F5B7406.2040808@attglobal.net> <3F5B7AC1.2070209@snert.com> <3F5BB643.3030205@attglobal.net> <3F5C4DF5.8050507@snert.com> In-Reply-To: <3F5C4DF5.8050507@snert.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Anthony Howe wrote: >> flock is used on FreeBSD by default... flock requires that chmod be >> done on the lock in the child init > > > As an aside, why is flock() used on FreeBSD? historical reasons? >> at Apache 2.0.48-dev, you have to do the chmod() on the lock file, >> like mod_ssl does in that branch > > > OK. Is there an API that returns what the APR_LOCK_DEFAULT mutex will be? not exactly, but there is an API that will give you the info you need: apr_proc_mutex_name(); pass it a mutex and it returns a string such as "sysvsem", "flock", "fcntl", etc. to indicate what mechanism is in use alternatively, if APR_USE_FLOCK_SERIALIZE is defined in apr.h then the default is flock > That would be the ideal solution, but I'm not sure I can wait until > 2.0.48. Plus not everyone upgrades when they should, so I need a work > around. probably won't be in 2.0.48 anyway > BTW are there any version macros in Apache 2 or the APR like: > > APACHE_VERSION_MAJOR > APACHE_VERSION_MINOR see ap_release.h for similar > APR_VERSION_MAJOR > APR_VERSION_MINOR see apr_version.h for similar