From owner-cvs-src@FreeBSD.ORG Thu Mar 1 19:44:16 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C8AF16A402; Thu, 1 Mar 2007 19:44:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id B364A13C478; Thu, 1 Mar 2007 19:44:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l21Ji770071233; Thu, 1 Mar 2007 14:44:09 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Bruce M Simpson Date: Thu, 1 Mar 2007 14:43:40 -0500 User-Agent: KMail/1.9.1 References: <200703011920.l21JKPDP058954@repoman.freebsd.org> In-Reply-To: <200703011920.l21JKPDP058954@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703011443.41496.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 01 Mar 2007 14:44:09 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2690/Thu Mar 1 06:11:27 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern sys_generic.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2007 19:44:16 -0000 On Thursday 01 March 2007 14:20, Bruce M Simpson wrote: > bms 2007-03-01 19:20:25 UTC > > FreeBSD src repository > > Modified files: > sys/kern sys_generic.c > Log: > Do not dispatch SIGPIPE from the generic write path for a socket; with > this patch the code behaves according to the comment on the line above. > > Without this patch, a socket could cause SIGPIPE to be delivered to its > process, once with SO_NOSIGPIPE set, and twice without. > > With this patch, the kernel now passes the sigpipe regression test. > > Tested by: Anton Yuzhaninov > MFC after: 1 week Pointy hat to: jhb This crept in when I merged dofilewrite() with kern_writev() when pwritev() was added. Prior to pwritev(), write() and pwrite() would DTRT, but writev() also had the double-signal problem. Looks like the original bug is that when SO_NOSIGPIPE was added, only dofilewrite() was updated, but not writev(). So, 4.x is fine, writev() is busted from 5.0 on, and write(), pwrite(), and pwritev() are busted from 6.0 on. -- John Baldwin