Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5 - Mailing list pgsql-hackers

From Manfred Spraul
Subject Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5
Date
Msg-id 3FA425BE.5060706@colorfullife.com
Whole thread Raw
In response to Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5  (Mark Wong <markw@osdl.org>)
Responses Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5  (Mark Wong <markw@osdl.org>)
List pgsql-hackers
Mark Wong wrote:

>Yeah, my dbt2 applications are multithreaded.
>
>
Do you need SIGPIPE delivery in your app? If no, could you try what
happens if you apply the attached patch to postgres, and perform the
    signal(SIGPIPE, SIG_IGN);
once in your dbt2 app?

--
    Manfred
--- pgsql.orig/src/interfaces/libpq/fe-secure.c    2003-11-01 22:28:13.000000000 +0100
+++ pgsql/src/interfaces/libpq/fe-secure.c    2003-11-01 22:27:21.000000000 +0100
@@ -348,7 +348,7 @@
     ssize_t        n;

 #ifndef WIN32
-    pqsigfunc    oldsighandler = pqsignal(SIGPIPE, SIG_IGN);
+/*    pqsigfunc    oldsighandler = pqsignal(SIGPIPE, SIG_IGN); */
 #endif

 #ifdef USE_SSL
@@ -408,7 +408,7 @@
         n = send(conn->sock, ptr, len, 0);

 #ifndef WIN32
-    pqsignal(SIGPIPE, oldsighandler);
+/*    pqsignal(SIGPIPE, oldsighandler); */
 #endif

     return n;

pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL
Next
From: Peter Eisentraut
Date:
Subject: Re: Proposal: psql force prompting on notty