Hi Alan,
Thanks for comment yes for >=JDK13 we are using new socket impl which does not have this problem, i am not planning to wright a test, to test this issue we need to get the native thread ID then we have to interrupt the thread to see if JDK code is behaving as expected.
I tested this issue at my local Linux env, what i did is modify the java.lang.Thread.getId() to always return the native thread id of main thread and use this native thread id in the test program to send a signal(kill -SIGPIPE threadid) and i checked that JDK code is behaving as expected.
We can try to write a test case(which requires some native code as well) which simulate the above but that will be lot of work.
We can file a new issue to write a test which test how(read,write,accept) operations behave when they are interrupted by a signal.
Alan, what do you think ?.
Thanks,
Vyom
----- Original message -----
From: Alan Bateman <alan.bate...@oracle.com>
To: Vyom Tewari26 <vtewa...@in.ibm.com>
Cc: net-dev@openjdk.java.net
Subject: [EXTERNAL] Re: RFR 8237858: PlainSocketImpl.socketAccept() handles EINTR incorrectly
Date: Wed, Mar 11, 2020 12:49 PM
Vyom,
Are you planning to create a native test for this? I realize the fix you
are discussing here isn't too interesting for >= JDK 13 but I think it
could be useful to ensure that we have a test that signals threads in
all of the blocking operations (connect might be tricky butt at least
read, write, and accept).
-Alan