Re: [RFC,PATCH] SIGPIPE masking in local socket connections

From: Jeremy Kerr <jk(at)ozlabs(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [RFC,PATCH] SIGPIPE masking in local socket connections
Date: 2009-06-02 13:52:01
Message-ID: 200906022352.01814.jk@ozlabs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2009-06-02 13:53:08 Re: [RFC,PATCH] SIGPIPE masking in local socket connections
Previous Message Kevin Grittner 2009-06-02 13:44:20 Re: User-facing aspects of serializable transactions