From owner-freebsd-java@FreeBSD.ORG Sat Feb 18 13:48:17 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02D8516A423 for ; Sat, 18 Feb 2006 13:48:17 +0000 (GMT) (envelope-from kurt@intricatesoftware.com) Received: from mta5.srv.hcvlny.cv.net (mta5.srv.hcvlny.cv.net [167.206.4.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C48B43D48 for ; Sat, 18 Feb 2006 13:48:16 +0000 (GMT) (envelope-from kurt@intricatesoftware.com) Received: from [172.16.1.72] (ool-457a77e8.dyn.optonline.net [69.122.119.232]) by mta5.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0IUV0082CYCFLV00@mta5.srv.hcvlny.cv.net> for freebsd-java@freebsd.org; Sat, 18 Feb 2006 08:48:15 -0500 (EST) Date: Sat, 18 Feb 2006 08:48:09 -0500 From: Kurt Miller In-reply-to: To: "Arne H. Juul" Message-id: <43F72599.4030009@intricatesoftware.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <43F4F22F.1060402@europe.yahoo-inc.com> <200602171054.11632.lists@intricatesoftware.com> User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060115) Cc: freebsd-java@freebsd.org Subject: Re: SO_REUSEADDR should not also mean SO_REUSEPORT X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 13:48:17 -0000 Arne H. Juul wrote: > On Fri, 17 Feb 2006, Kurt Miller wrote: > >>> I don't know why this code was put into the bsd jdk patches, it just >>> seems plain wrong to me. It makes java subtly non-portable in a very >>> strange manner; I suggest this code is removed. Below is the patch >>> I'm currently using :-) >> >> >> Linux and Solaris don't have SO_REUSEPORT. I believe their >> SO_REUSEADDR is equivalent to SO_REUSEADDR + SO_REUSEPORT >> on bsd. > > > no, that's not true. > SO_REUSEADDR behaves the same on bsd, linux, and solaris. > > I don't know if there's any way on linux or solaris > to get the behaviour that SO_REUSEPORT triggers on FreeBSD. Ok, thanks. I got that impression from reading some posts I found while googling. There was one in particular for NetBSD that discussed it in detail. Check out the Apr 2 portion of this http://www.tinyurl.com/b46gq by Jan Schaumann. Also this one http://tinyurl.com/9sa6a. From these posts it appears that SO_REUSEPORT is needed in some cases to be compatible with linux. -Kurt