Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXSpA-0006y7-My for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2015 11:37:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXSpA-00085G-1F for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2015 11:37:00 +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 1ZXSoY-0007O4-Im for pgsql-bugs@postgresql.org; Thu, 03 Sep 2015 11:36:22 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZXSoS-00023q-2r for pgsql-bugs@postgresql.org; Thu, 03 Sep 2015 11:36:21 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id C3C99860002; Thu, 3 Sep 2015 13:36:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p54AF4EF5.dip0.t-ipconnect.de [84.175.78.245]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id AF8CB860001; Thu, 3 Sep 2015 13:36:11 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 46204100D9F; Thu, 3 Sep 2015 13:36:11 +0200 (CEST) Date: Thu, 3 Sep 2015 13:36:11 +0200 From: Andres Freund To: Michael Paquier Cc: ekocjan@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe Message-ID: <20150903113611.GD27649@awork2.anarazel.de> References: <20150828104658.2089.83265@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) 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 On 2015-08-31 15:51:57 +0900, Michael Paquier wrote: > if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken)) > { > +#ifndef FRONTEND > write_stderr("could not open process token: error code %lu\n", > GetLastError()); > +#else > + fprintf(stderr, "could not open process token: error code %lu\n", > + GetLastError()); > +#endif > exit(1); > } I find these kind of ifdefs rather ugly - why not just introduce a wrapper? Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs