Re: SysLogger subprocess

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SysLogger subprocess
Date: 2004-07-15 19:36:04
Message-ID: 20040715193604.GA3393@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 15, 2004 at 09:00:50PM +0200, Andreas Pflug wrote:

> While looking at pgstat.c to see how to peek for pipe data, I found
> readpipe=pgStatPipe[0];
> select(readPipe+1, ..);
>
> which is probably usually the same as select(pgStatPipe[1], ..) This fd
> arithmetics seem a bit dubious to me.

No, it's not pgStatPipe[1], it's select(2)'s first argument; max fd in
the sets plus one. Probably your code works because
pgStatPipe[1] == pgStatPipe[0] + 1.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Por suerte hoy explotó el califont porque si no me habría muerto
de aburrido" (Papelucho)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2004-07-15 19:37:41 Re: How to display privileges in psql
Previous Message Simon Riggs 2004-07-15 19:35:27 Re: Point in Time Recovery