> Hi, > > This change updates the use of NET_ThrowNew in Inet4AddressImpl.c + > Inet6AddressImpl.c (unix). > Currently EINTR is incorrectly handled in NET_ThrowNew to throw > InterruptedIOException. > > The only possible places in these files where EINTR can be returned is in the > sendto() calls > for ping4() and ping6() used by the InetAddress.isReachable() API. > > The change checks for EINTR returned from those calls and restarts the > sendto() > if the timeout allows it. If EINTR is detected by NET_ThrowNew it is thrown > as an ordinary > SocketException, but this should not happen. > > The fix is only partially tested as it is difficult to make sendto() return > EINTR in practice, but > I added a unit test for the new native function that checks if the timeout > has expired. > > Thanks, > Michael
Michael McMahon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 15 additional commits since the last revision: - impl update - Merge branch 'master' into EINTR-8370655 - impl update - update - header file update - impl update - removed test updated impl - Merge branch 'master' into EINTR-8370655 - copyright - impl update - ... and 5 more: https://git.openjdk.org/jdk/compare/50602667...f170dea7 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28750/files - new: https://git.openjdk.org/jdk/pull/28750/files/899a4d5c..f170dea7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28750&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28750&range=01-02 Stats: 7676 lines in 277 files changed: 4876 ins; 978 del; 1822 mod Patch: https://git.openjdk.org/jdk/pull/28750.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28750/head:pull/28750 PR: https://git.openjdk.org/jdk/pull/28750
