Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 21373 invoked from network); 23 Jun 2009 20:08:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 20:08:20 -0000 Received: (qmail 56174 invoked by uid 500); 23 Jun 2009 20:08:17 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 56115 invoked by uid 500); 23 Jun 2009 20:08:17 -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 56093 invoked by uid 99); 23 Jun 2009 20:08:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 20:08:17 +0000 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 [88.198.11.6] (HELO eru.sfritsch.de) (88.198.11.6) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 20:08:09 +0000 Received: from k.lan ([10.1.1.6] helo=k.localnet) by eru.sfritsch.de with esmtp (Exim 4.63) (envelope-from ) id 1MJCHT-0001eB-Dk for dev@apr.apache.org; Tue, 23 Jun 2009 22:07:47 +0200 From: Stefan Fritsch To: dev@apr.apache.org Subject: Workaround for linux/hppa bug Date: Tue, 23 Jun 2009 22:07:46 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.29-2-686; KDE/4.2.4; i686; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906232207.46581.sf@sfritsch.de> X-Virus-Checked: Checked by ClamAV on apache.org Hi, there is a long standing bug in the Linux/hppa kernel that flock() returns EAGAIN and not EWOULDBLOCK. On all other architectures, these two are defined to be the same. This causes testprocmutex to fail. Cheers, Stefan --- apr-1.3.3~/locks/unix/proc_mutex.c +++ apr-1.3.3/locks/unix/proc_mutex.c @@ -683,7 +683,7 @@ rc = flock(mutex->interproc->filedes, LOCK_EX | LOCK_NB); } while (rc < 0 && errno == EINTR); if (rc < 0) { - if (errno == EWOULDBLOCK) { + if (errno == EWOULDBLOCK || errno == EAGAIN) { return APR_EBUSY; } return errno;