Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 70FFD6352E4 for ; Tue, 2 Jun 2009 10:53:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 81868-03-6 for ; Tue, 2 Jun 2009 10:53:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) by mail.postgresql.org (Postfix) with ESMTP id 8C0946352AA for ; Tue, 2 Jun 2009 10:53:24 -0300 (ADT) Received: by bilbo.ozlabs.org (Postfix, from userid 1023) id 2E88CB707C; Tue, 2 Jun 2009 23:53:20 +1000 (EST) From: Jeremy Kerr To: pgsql-hackers@postgresql.org Subject: Re: [RFC,PATCH] SIGPIPE masking in local socket connections Date: Tue, 2 Jun 2009 23:52:01 +1000 User-Agent: KMail/1.11.2 (Linux/2.6.28-11-generic; KDE/4.2.2; i686; ; ) Cc: Tom Lane References: <1243914753.517210.131510259224.0.gpush@pingu> <10549.1243949503@sss.pgh.pa.us> In-Reply-To: <10549.1243949503@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906022352.01814.jk@ozlabs.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/136 X-Sequence-Number: 139191 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