Re: [HACKERS] libpq and psql not on same page about SIGPIPE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: manfred(at)colorfullife(dot)com, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] libpq and psql not on same page about SIGPIPE
Date: 2004-12-02 03:45:15
Message-ID: 200412020345.iB23jFO11492@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Yes, that is the logic in my patch, except that I don't check errno, I
> > just call sigpending().
>
> No, that's wrong: if there is a pending SIGPIPE that belongs to the
> outer app, you'd clear it.

True, but I documented that in the patch.

> > There are a few writes and it seemed impossible
> > to check them all.
>
> Hmm? There is only one place this needs to be done, namely
> pqsecure_write.

Look also in fe-print.c. Looks like a lot of popen writes in there.
I can do it but it will be harder.

> BTW, have you posted the patch yet or are you still working on it?
> The mail server seems a bit flaky today ...

OK, patch attached. I already sent it but who knows what happened to
it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 12.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-12-02 03:47:22 Re: [HACKERS] libpq and psql not on same page about SIGPIPE
Previous Message Tom Lane 2004-12-02 03:31:22 Re: libpq and psql not on same page about SIGPIPE

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-12-02 03:47:22 Re: [HACKERS] libpq and psql not on same page about SIGPIPE
Previous Message Tom Lane 2004-12-02 03:31:22 Re: libpq and psql not on same page about SIGPIPE