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

Duplicate implementations of os::lasterror

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 9
    • hotspot
    • b01
    • generic
    • generic

      The Linux, Solaris, BSD, and AIX implementations of os::lasterror are identical, and could be replaced with a single os_posix implementation.

      A related question is whether we really need os::lasterror at all. The only non-Windows code that calls it is metaspaceShared.cpp, in two places. Both of those places are in response to an fopen call that failed, so nothing platform-specific about that, since fopen is a standard C function that is defined to set errno to indicate the error. So both of these calls to os::lasterror could be replaced with calls to strerror(errno).

            pchilanomate Patricio Chilano Mateo
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: