From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | ekocjan(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe |
Date: | 2015-09-03 12:28:51 |
Message-ID: | CAB7nPqQp0+d0xQ36tSrmYf0av3OvDYki78MZuKE9RUSiF7YSFA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Sep 3, 2015 at 8:36 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> 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?
I thought it was just not worth it for this file. I don't mind
updating if you think that's cleaner this way.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Terje Elde | 2015-09-03 15:55:00 | Re: INSERT INTO .. SELECT nextval() ORDER BY - returns unexpectedly ordered values |
Previous Message | Tom Lane | 2015-09-03 12:27:49 | Re: INSERT INTO .. SELECT nextval() ORDER BY - returns unexpectedly ordered values |