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

Re: SIGPIPE handling

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SIGPIPE handling
Date: 2003-11-16 18:20:14
Message-ID: 3FB7BFDE.3070303@colorfullife.com (view raw or flat)
Thread:
Lists: pgsql-patches
Bruce Momjian wrote:

>I thought it should be global too, basically testing on the first
>connection request.
>
What if two PQconnect calls happen at the same time?
I would really prefer the manual approach with a new PQsetsighandler 
function - the autodetection is fragile, it's trivial to find a special 
case where it breaks.
Bruce, you wrote that a new function would be overdesign. Are you sure? 
Your simpler proposals all fail with multithreaded apps.
I've attached the patch that implements the global flag with two special 
function that access it.

--
    Manfred

Attachment: patch-sigpipe-global
Description: text/plain (8.0 KB)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2003-11-16 18:21:38
Subject: Re: [PATCHES] SRA Win32 sync() code
Previous:From: Bruce MomjianDate: 2003-11-16 18:06:48
Subject: Re: [PATCHES] SRA Win32 sync() code

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