Duplicate implementations of os::lasterror

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 12
    • Affects Version/s: 9
    • Component/s: 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).

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

              Created:
              Updated:
              Resolved: