From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 18 19:13:52 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4651016A4CE; Tue, 18 Jan 2005 19:13:52 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 2550E43D2D; Tue, 18 Jan 2005 19:13:51 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 18 Jan 2005 19:13:50 +0000 (GMT) Date: Tue, 18 Jan 2005 19:13:49 +0000 From: David Malone To: Steven Hartland Message-ID: <20050118191349.GA43822@walton.maths.tcd.ie> References: <00be01c4fd71$046adae0$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00be01c4fd71$046adae0$b3db87d4@multiplay.co.uk> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie cc: freebsd-hackers@freebsd.org cc: freebsd-emulation@freebsd.org Subject: Re: Patch for linux ABI for MSG_NOSIGNAL and out of order tcp packet issue X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 19:13:52 -0000 On Tue, Jan 18, 2005 at 03:18:42PM -0000, Steven Hartland wrote: > The attached patch checks for > MSG_NOSIGNAL and if set enables SO_NOSIGPIPE > for the duration of send call. I just had a quick look at the patch. The patch should probably use kern_setsockopt, which will simplify it considerably. (kern_setsockopt was introduced to FreeBSD 5 this summer to make it easier to do this sort of thing). It would probably also be better to do a kern_getsockopt first to find out if SO_NOPIPE is set and only turn it off afterwards if it wasn't already on. > Im not 100% sure this is the > way to do it but have confirmed that the patch works on > 5.2.1 so if someone could check and commit it that would > be great. I guess that it would be even better if we could just pass SO_NOPIPE to send, or even implement MSG_NOSIGNAL on FreeBSD, but your patch is probably a reasonably start. David.