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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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 | Content-Type | Size |
---|---|---|
patch-sigpipe-global | text/plain | 8.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-16 18:21:38 | Re: [PATCHES] SRA Win32 sync() code |
Previous Message | Bruce Momjian | 2003-11-16 18:06:48 | Re: [PATCHES] SRA Win32 sync() code |