Re: serverlog rotation/functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: serverlog rotation/functions
Date: 2004-07-14 13:40:22
Message-ID: 26109.1089812422@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I wrote:
> close(2);
> d = dup(p[0]);
> Assert(d == 2);

Having re-read the pipe(2) man page, of course that should be
d = dup(p[1]);
since it's the writing end of the pipe you want to plug stderr into.

BTW, if it wasn't clear: I'd do the same pushup for stdout too,
just in case. I'm not sure there is any output to stdout left in the
backend, but I wouldn't swear there is not, either.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-07-14 14:48:00 Better fixes for pg_dump bugs
Previous Message Tom Lane 2004-07-14 13:35:55 Re: serverlog rotation/functions