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

Do not restart close if errno is EINTR

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7, 8, 10, 11
    • Fix Version/s: 11
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b20
    • OS:
      linux
    • Verification:
      Not verified

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  igerasim Ivan Gerasimov
                  Reporter:
                  igerasim Ivan Gerasimov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: