Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 91678 invoked from network); 4 Feb 2007 22:31:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2007 22:31:35 -0000 Received: (qmail 52750 invoked by uid 500); 4 Feb 2007 22:31:41 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 52382 invoked by uid 500); 4 Feb 2007 22:31:40 -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 52371 invoked by uid 99); 4 Feb 2007 22:31:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Feb 2007 14:31:40 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [80.229.52.226] (HELO grimnir.webthing.com) (80.229.52.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Feb 2007 14:31:31 -0800 Received: from grimnir.webthing.com (localhost [127.0.0.1]) by grimnir.webthing.com (Postfix) with ESMTP id EB4A72141 for ; Sun, 4 Feb 2007 22:31:08 +0000 (GMT) Date: Sun, 4 Feb 2007 22:31:08 +0000 From: Nick Kew To: dev@apr.apache.org Subject: Re: apr_file operations returning system errno as apr_status_t Message-ID: <20070204223108.56748264@grimnir> In-Reply-To: <7edfeeef0702031507yb3bf892n62ad4de5818b25a9@mail.gmail.com> References: <20070203094804.0a3b236e@grimnir> <7edfeeef0702031507yb3bf892n62ad4de5818b25a9@mail.gmail.com> Organization: WebThing X-Mailer: Sylpheed-Claws 2.5.0-rc3 (GTK+ 2.10.6; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Sun, 4 Feb 2007 00:07:22 +0100 "Garrett Rooney" wrote: > On 2/3/07, Nick Kew wrote: > > Someone on IRC #apache just reported a stupid error message: > > > > (20014)Error string not specified yet: Error retrieving pid > > file /var/run/apache2.pid > > > > I took a look at what could be causing it, and it appears to > > be down to apr_file_* functions returning an old-fashioned > > system errno as an apr_status_t value. I haven't reproduced > > the user's reported error, but it comes from either > > apr_file_open or apr_file_read (via apr_file_read_full). > > > > Not sure how best to tackle this. Is there some reasoning > > behind what errno numbers can be returned here? > > I was under the impression that apr_status_t is a superset of errno, > so returning the current errno should be perfectly fine... Nevertheless, the outcome (nonsense in place of an error message) is disturbing. That string comes from apr_error_string(), which should only happen for numbers in the range above APR_OS_START_ERROR where these strings are defined. Smells of bug to me, though it could of course be a build bug. FWIW, this error looks like APR_EGENERAL offset from the wrong base. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/