Date: Thu, 1 Mar 2007 14:43:40 -0500 From: John Baldwin <jhb@freebsd.org> To: Bruce M Simpson <bms@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern sys_generic.c Message-ID: <200703011443.41496.jhb@freebsd.org> In-Reply-To: <200703011920.l21JKPDP058954@repoman.freebsd.org> References: <200703011920.l21JKPDP058954@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703011443.41496.jhb>