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-04 01:28:01 |
Message-ID: | CAB7nPqR=FsgqOsQL6qUC04XWbZ93Q9BC-qEmHu2Cvh8uMRNrNQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Sep 3, 2015 at 9:28 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:
> 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.
>
New patch attached, updated in consequence.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20150904_win32_service_v2.patch | text/x-diff | 12.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2015-09-04 05:07:07 | Re: PQexec() hangs on OOM |
Previous Message | Thomas Munro | 2015-09-03 22:24:43 | Re: GRANT USAGE ON SEQUENCE missing from psql command completion |