Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Date
Msg-id 20150903113611.GD27649@awork2.anarazel.de
Whole thread Raw
In response to Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #13440: unaccent does not remove all diacritics
Next
From: Fujii Masao
Date:
Subject: Re: GRANT USAGE ON SEQUENCE missing from psql command completion