Hello,   there was some discussion on the topic  in  the review of  
https://bugs.openjdk.java.net/browse/JDK-8206145
And  an outcome was that   at least   AIX recommends to repeat the close call 
on EINTR  .

Best regards, Matthias

> 
> Message: 4
> Date: Wed, 27 Jun 2018 18:23:36 -0500
> From: David Lloyd <dll...@redhat.com>
> To: Ivan Gerasimov <ivan.gerasi...@oracle.com>
> Cc: net-dev@openjdk.java.net
> Subject: Re: RFR : 8205959 : Do not restart close if errno is EINTR
> Message-ID: <7706c3a4-9f23-47a2-8196-0d0c40507...@redhat.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> According to http://man7.org/linux/man-pages/man2/close.2.html it is
> currently platform-dependent whether close() must or must not (seems to
> be no middle ground) be retried.  Might have to do some #ifdef guarding?
> 
> --
> - DML
> 
> 
> > On Jun 27, 2018, at 6:15 PM, Ivan Gerasimov <ivan.gerasi...@oracle.com>
> 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/
> >
> > Thanks in advance!
> >
> > --
> > With kind regards,
> > Ivan Gerasimov
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mail.openjdk.java.net/pipermail/net-
> dev/attachments/20180627/07adf407/attachment.html>
> 

Reply via email to