Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205959

Do not restart close if errno is EINTR

XMLWordPrintable

    • b20
    • linux
    • Not verified

        In java.base/linux/native/libnet/linux_close.c:

                do {
                    if (fd1 < 0) {
                        rv = close(fd2);
                    } else {
                        rv = dup2(fd1, fd2);
                    }
                } while (rv == -1 && errno == EINTR);

        However, the close() call is not restartable.
        Only dup2() needs to be restarted if interrupted.

              igerasim Ivan Gerasimov
              igerasim Ivan Gerasimov
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: