Re: SIGPIPE handling, take two. - Mailing list pgsql-patches

From Manfred Spraul
Subject Re: SIGPIPE handling, take two.
Date
Msg-id 3FB11E70.9090800@colorfullife.com
Whole thread Raw
In response to Re: SIGPIPE handling, take two.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SIGPIPE handling, take two.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:

>I don't think we need to complicate pqsignal's API for this.  Instead
>we'd better document that SIGPIPE handling has to be set up and kept
>stable before doing any libpq operations in a multithread app.
>
>
Not reliable.
An app could install it's own signal handler and block SIGPIPE around
all libpq calls. Signal blocking is per-thread. But the SIG_IGN/restore
sequence affects the whole app - PQconnectdb calls would result in
randomly dropped SIGPIPE signals.

--
    Manfred


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SIGPIPE handling, take two.
Next
From: Michael Mauger
Date:
Subject: Re: [HACKERS] Proposal: psql force prompting on notty