Re: [RFC,PATCH] SIGPIPE masking in local socket connections - Mailing list pgsql-hackers

From Jeremy Kerr
Subject Re: [RFC,PATCH] SIGPIPE masking in local socket connections
Date
Msg-id 200906022352.01814.jk@ozlabs.org
Whole thread Raw
In response to Re: [RFC,PATCH] SIGPIPE masking in local socket connections  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [RFC,PATCH] SIGPIPE masking in local socket connections  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom,

> The consideration is that the application fails completely on server
> disconnect (because it gets SIGPIPE'd).  This was long ago deemed
> unacceptable, and we aren't likely to change our opinion on that.

OK, understood. I'm guessing MSG_NOSIGNAL on the send() isn't portable 
enough here?

> What disturbs me about your report is the suggestion that there are
> paths through that code that fail to protect against SIGPIPE.  If so,
> we need to fix that.

I just missed the comment that pqsecure_read may end up writing to the 
socket in the SSL case, so looks like all is fine here. We shouldn't see 
a SIGPIPE from the recv() alone.

Cheers,


Jeremy


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: User-facing aspects of serializable transactions
Next
From: Aidan Van Dyk
Date:
Subject: Re: PostgreSQL Developer meeting minutes up