Skip site navigation (1) Skip section navigation (2)

Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: AgentM <agentm(at)webopticon(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL
Date: 2003-11-02 21:10:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
AgentM wrote:

> That wouldn't offer a solution for people who use SIGPIPE for other 
> things during the lifetime of the program (after creating the 
> connection) and if a SIGPIPE handler is called due to the connection, 
> the handler won't be expecting the source, and polling signal for 
> state is essentially what you do now. Instead, I propose a 
> PQsigpipeOK/PQacceptsigpipe/PQrecvsigpipe(PGconn*) or something to 
> that effect which skips this check for the connection. That way, 
> programmers are aware that the connection could call their SIGPIPE 
> handler because they explicitly request it and the library remains 
> backwards-compatible.

If I understand libpq sources correctly, the first packets are send 
during connection setup - PQsigpipeOK(PGconn *) would be too late.
That's why I added "sigpipe=caller" as a new flag for PQconnectdb.


In response to


pgsql-hackers by date

Next:From: Andrew DunstanDate: 2003-11-02 21:20:50
Subject: Re: Experimental patch for inter-page delay in VACUUM
Previous:From: AgentMDate: 2003-11-02 20:32:51
Subject: Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group