RFR : 8205959 : Do not restart close if errno is EINTR
Alan Bateman
Alan.Bateman at oracle.com
Thu Jun 28 07:32:44 UTC 2018
On 28/06/2018 00:15, Ivan Gerasimov wrote:
> Hello!
>
> When closing a socket via NET_SocketClose(int fd), a close(fd) is called.
> The later is wrapped in a retry-loop, which is wrong because close()
> is not restartable.
>
> The `man 2 close` states:
> """
> ... close() should not be retried after an EINTR since this may cause
> a reused descriptor from another thread to be closed.
> """
>
> Would you please help review a trivial fix?
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8205959
> WEBREV: http://cr.openjdk.java.net/~igerasim/8205959/00/webrev/
This looks good.
-Alan
More information about the net-dev
mailing list