From owner-freebsd-hackers Tue Jan 6 16:53:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA14007 for hackers-outgoing; Tue, 6 Jan 1998 16:53:58 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA13966; Tue, 6 Jan 1998 16:53:37 -0800 (PST) (envelope-from pb@fasterix.frmug.org) Received: (from uucp@localhost) by frmug.org (8.8.8/frmug-2.2/nospam) with UUCP id BAA16489; Wed, 7 Jan 1998 01:53:30 +0100 (CET) (envelope-from pb@fasterix.frmug.org) Received: (from pb@localhost) by fasterix.frmug.org (8.8.8/8.8.5/pb-19970302) id BAA24984; Wed, 7 Jan 1998 01:50:53 +0100 (CET) Message-ID: <19980107015053.TL50316@@> Date: Wed, 7 Jan 1998 01:50:53 +0100 From: pb@fasterix.freenix.org (Pierre Beyssac) To: emulation@FreeBSD.ORG Cc: hackers@FreeBSD.ORG Subject: playing with the Linux JDK 1.1.3 under -current X-Mailer: Mutt 0.59.1e Mime-Version: 1.0 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk [ this is mainly an emulator problem, but as it seems to involve more general questions about differing socket semantics under Linux vs FreeBSD, I Cc: this to -hackers ] I've been playing with the Linux JDK (v 1.1.3) under FreeBSD-current. Works fairly well, except for two problems I encountered. Note that the issue here is not so much having a running JDK (since there are others, native projects for this under FreeBSD) as using the Linux JDK as a compliance test for the Linux emulator :-) - fetching remote URLs in the Appletviewer (as in appletviewer http://xxxx/some_cool_applet_page.html) doesn't work ("already connected" error). Especially when the connection takes a long time to establish (remote site). In fact this occurs in the runtime code used for any Java connect(). - I have problems with a program using Netscape IFC classes V1.1.2 (freezes when exposing its window), while IFC 1.1.1 works perfectly fine. I'm told by a Linux user that these both work ok with the JDK under Linux, so these are probably not JDK bugs. I know where the first problem comes from and have been able to patch the Linux emulator code for a quick and dirty hack around the problem, by ignoring the ISCONN error when returned by connect(). The JDK runtime is apparently not expecting this error when redoing a connect() on a non-blocking socket, after the first connect() failed with a EINPROGRESS. Note that the original JDK code itself is hacked to work around Solaris socket bugs, which excuses this rather disgusting way of handling things... In the other case, the Java runtime is waiting (wchan=pause, according to ps) and doesn't fetch a variable amount of data it apparently got on its socket from the X server (it apparently fills with X events as you move the mouse and click). It all looks like subtle differences in the handling of non-blocking sockets between Linux and FreeBSD. Does anyone know about any such differences? I'm looking into this when I can spare a little time, but I thought maybe it would be a good idea to ask there first :-) -- Pierre Beyssac pb@fasterix.frmug.org pb@fasterix.freenix.org {Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher Free domains: http://www.eu.org/ or mail dns-manager@EU.org