From owner-freebsd-java Sun May 26 23:25:17 2002 Delivered-To: freebsd-java@freebsd.org Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19]) by hub.freebsd.org (Postfix) with ESMTP id D580137B401 for ; Sun, 26 May 2002 23:25:12 -0700 (PDT) Received: from linux (coffee.syncrontech.com [62.71.8.37]) by guinness.syncrontech.com (8.11.6/8.11.6) with ESMTP id g4R6Op332256; Mon, 27 May 2002 09:24:52 +0300 (EEST) (envelope-from ari.suutari@syncrontech.com) Content-Type: text/plain; charset="iso-8859-1" From: Ari Suutari Organization: Syncron Tech Oy To: Greg Lewis , "Robert F. Ross" Subject: Re: JDK 1.3.1, FreeBSD 4.5, JNI and select() Date: Mon, 27 May 2002 09:26:38 +0300 X-Mailer: KMail [version 1.4] Cc: freebsd-java@FreeBSD.ORG References: <20020527012831.A99647@misty.eyesbeyond.com> In-Reply-To: <20020527012831.A99647@misty.eyesbeyond.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205270926.39005.ari.suutari@syncrontech.com> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, On Sunday 26 May 2002 18:58, Greg Lewis wrote: > > > An ldd on the final java binary > > shows that it's using libc.so.4, not libc_r.so.4. I've been experienc= ing > > problems with select() calls in JNI routines always waiting for the f= ull > > timeout when checking readfds (write seems happy) instead of returnin= g as > > soon as the data is available. poll() appears to have the same > > behavior. Has anyone seen this issue and know how to fix it? > > Not having tried to do this I haven't seen this issue. The Java Comm A= PI > uses this select() in JNI code and seems to work ok, however I'm not > sure of the details. It might be worth looking at the code for it > (its in the PR system to be committed as a port if it hasn't been > already). =09Java Comm API used select in jdk 1.1.8 days, but I have =09changed it to use poll because of similar problems. If I remember =09correctly, there are wrappers in green_threads package for =09various syscalls. There is a wrapper for "poll", but there is=20 =09no wrapper for "select" which breaks threading when it =09is called by JNI code.=20 =09=09Ari S. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message