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

Java 6/7 JNI calling open() does not set errno on failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6u1
    • hotspot
    • None
    • sparc
    • solaris_10

      The C library function "open" should set errno on failure, as documented in then open(2) man page. This works as expected when open is called from a JNI function running under java 1.4.x or 1.5.x. However, under 1.6.0_01 (also tried 1.6.0_02 and 1.7.0-ea-b12) the errno value is not set. See the simple test program in the CR attachments (don't run the test program as superuser, as it relies on 000 permissions being unreadable).

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: