Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VoIEG-0002l4-0S for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2013 19:35:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VoIEF-0007L5-Gn for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2013 19:35:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VoIEE-0007Ky-Iv for pgsql-bugs@postgresql.org; Wed, 04 Dec 2013 19:35:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VoIEB-000553-Qu for pgsql-bugs@postgresql.org; Wed, 04 Dec 2013 19:35:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rB4JYvX5023404; Wed, 4 Dec 2013 14:34:57 -0500 From: Tom Lane To: Bruce Momjian cc: Alvaro Herrera , nicolas@marchildon.net, pgsql-bugs@postgresql.org Subject: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd In-reply-to: <20131204155257.GD17114@momjian.us> References: <296.1367950228@sss.pgh.pa.us> <20130507181904.GA26800@eldon.alvh.no-ip.org> <20131204155257.GD17114@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 04 Dec 2013 10:52:57 -0500" Date: Wed, 04 Dec 2013 14:34:57 -0500 Message-ID: <23403.1386185697@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Bruce Momjian writes: > I have developed the attached patch to fix this and another instance I > saw. I think you need to re-read the part of the man page you quoted, and set errno to zero beforehand, if you're going to rely on it being zero after a non-error return. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs