Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1acxIo-0006jq-Lm for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Mar 2016 15:42:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1acxIo-0002qm-3e for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Mar 2016 15:42:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1acxIB-0001LU-EZ for pgsql-bugs@postgresql.org; Mon, 07 Mar 2016 15:41:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1acxI9-0006C2-1n for pgsql-bugs@postgresql.org; Mon, 07 Mar 2016 15:41:54 +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 u27FflTF020771; Mon, 7 Mar 2016 10:41:47 -0500 From: Tom Lane To: Michael Paquier cc: doublem09@googlemail.com, PostgreSQL mailing lists Subject: Re: BUG #14001: pg_ctl error output empty/faulty In-reply-to: References: <20160305120021.2722.16982@wrigleys.postgresql.org> Comments: In-reply-to Michael Paquier message dated "Mon, 07 Mar 2016 19:48:54 +0900" Date: Mon, 07 Mar 2016 10:41:47 -0500 Message-ID: <20770.1457365307@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 Michael Paquier writes: > On Sat, Mar 5, 2016 at 9:00 PM, wrote: >> After a brief test it seems this can be fixed by correcting the negation >> "if (!pgwin32_is_service())" to "if (pgwin32_is_service())" in pg_ctl.c >> write_stderr(...). > Indeed. I don't think that this oversight from a9676139 needs much comment... > --- a/src/bin/pg_ctl/pg_ctl.c > +++ b/src/bin/pg_ctl/pg_ctl.c > @@ -216,7 +216,7 @@ write_stderr(const char *fmt,...) > * On Win32, we print to stderr if running on a console, or write to > * eventlog if running as a service > */ > - if (!isatty(fileno(stderr))) /* Running as a service */ > + if (!pgwin32_is_service()) /* Running as a service */ > { > Could somebody switch this condition? We should not write to the event > logs if this code is not run for a service. Done. 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