Re: SIGPIPE handling - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: SIGPIPE handling
Date
Msg-id 200311170017.hAH0HnB26957@candle.pha.pa.us
Whole thread Raw
In response to Re: SIGPIPE handling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Yes, I was afraid of that.  Here's another idea.  If the signal handler
> > is SIG_DFL, we install our own signal handler for SIGPIPE, and set/clear a
> > global variable before/after we send().
>
> That would address the speed issue but not the multithread correctness
> issue.  Also, what happens if the app replaces the signal handler later?

Well, our current setup doesn't do multithreaded properly either.  In
fact, I am starting to worry about libpq's thread-safety.   Should I?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SRA Win32 sync() code
Next
From: Bruce Momjian
Date:
Subject: Re: SIGPIPE handling