Native Socket Error On OS X (BSDs)

Xiaobin Lu Xiaobin.Lu at Sun.COM
Tue Dec 23 14:07:27 PST 2008


Hi Michael,

I agree with you that we should understand why the comments are there 
and whether it is correct. I am also wondering whether we should remove 
the interruptible I/O support completely. The interruptible I/O is only 
supported on Solaris and recently we switch the flag 
UseVMInterruptibleIO to false by default for JDK 7 (bug 6554406 & 
6382902). But it is probably a good idea to remove that support since 
that will get rid of many confusions around.

There was a discussions around whether we should use "select" over 
"poll" in general and the past experience told us "poll" performs better 
and "select" is problematic and can result in very odd failures if you 
have file handle numbers that exceed the bitmap capacity. Plus, on some 
systems select is emulated via poll.

Regards,
-Xiaobin

On 12/23/08 10:54, Michael Franz wrote:
> Xiaobin,
>
> I would rather determine if the comments are correct or not.
>     // XXXDARWIN: poll() appears non-interruptable on Leopard: 
> Thread.interrupt() failed to
>     // cause interrupt. Does poll work at all on Tiger? Needs 
> investigation.
>
> I am interested in why Linux and FreeBSD cannot use this code.
> If we can have the same code for all platforms it will be easier to 
> maintain.
>
> Michael
>
> On Tue, Dec 23, 2008 at 1:20 PM, Xiaobin Lu <Xiaobin.Lu at sun.com 
> <mailto:Xiaobin.Lu at sun.com>> wrote:
>
>     Michael,
>
>     Thanks for your investigation on this. So instead of removing the
>     Apple specific code, can we just detect the "-1" argument and pass
>     "NULL" to select as the last argument which has equivalent meaning
>     as "-1" to "poll"? I think that might be a safer fix than just
>     removing that code.
>
>     My 2 cents.
>
>     -Xiaobin
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20081223/b8276e0f/attachment.html 


More information about the bsd-port-dev mailing list