Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Дата
Msg-id CAB7nPqR=FsgqOsQL6qUC04XWbZ93Q9BC-qEmHu2Cvh8uMRNrNQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs


On Thu, Sep 3, 2015 at 9:28 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Thu, Sep 3, 2015 at 8:36 PM, Andres Freund <andres@anarazel.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.

New patch attached, updated in consequence.
--
Michael
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: GRANT USAGE ON SEQUENCE missing from psql command completion
Следующее
От: dlaster@innovative-as.com
Дата:
Сообщение: BUG #13609: Documentation Section 9.14.3 nsarray usage problem