pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: ekocjan@gmail.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Date: Thu, 3 Sep 2015 13:36:11 +0200
Message-ID: <20150903113611.GD27649@awork2.anarazel.de> (raw)
In-Reply-To: <CAB7nPqSbyTrYcGdHzE5G37npi=1unuLjNAg8O_BxHj9kurRD5w@mail.gmail.com>
References: <20150828104658.2089.83265@wrigleys.postgresql.org>
	<CAB7nPqSbyTrYcGdHzE5G37npi=1unuLjNAg8O_BxHj9kurRD5w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (20+ messages)  latest in thread

Message-ID: <20150903113611.GD27649@awork2.anarazel.de>
Permalink:  ../20150903113611.GD27649@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20150903113611.GD27649@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, michael.paquier@gmail.com
  Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
  In-Reply-To: <20150903113611.GD27649@awork2.anarazel.de>
  References: <20150828104658.2089.83265@wrigleys.postgresql.org> <CAB7nPqSbyTrYcGdHzE5G37npi=1unuLjNAg8O_BxHj9kurRD5w@mail.gmail.com> <20150903113611.GD27649@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox