RFR 8237858: PlainSocketImpl.socketAccept() handles EINTR incorrectly

Daniel Fuchs daniel.fuchs at oracle.com
Wed Jun 24 10:40:57 UTC 2020


Hi Vyom,

What is the purpose of calling NativeThread.close?
Is that just to clean up and make the server thread terminate?
If so there should be better ways to do that.

When does the test succeed?

Looking at SocketAcceptInterruptTest it looks like the test
will succeed if it manages to send the signal - and that's it.
Is it really a measure of success?

Also it seems like better synchronization primitive could
be used (for instance CountDownLatch) than relying on arbitrary
timeout. In particular `isSet` could be a CountDownLatch.

best regards,

-- daniel

On 24/06/2020 05:53, Vyom Tiwari wrote:
> Hi Daniel/Alan,
> 
> Thanks for the review , I was not sure how JVM/JDK handles the signals 
> that's why I installed my own signal handler. As you both pointed out, I 
> removed the custom signal handler in NativeThread.
> 
> Please find the latest 
> webrev(http://cr.openjdk.java.net/~vtewari/8237858/webrev0.5/index.html) 
> where i have incorporated most of the review comments.
> 
> Thanks,
> Vyom


More information about the net-dev mailing list