United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7146506 (fc) Add EACCES check to the return of fcntl native method
JDK-7146506 : (fc) Add EACCES check to the return of fcntl native method

Details
Type:
Bug
Submit Date:
2012-02-17
Status:
Closed
Updated Date:
2012-10-29
Project Name:
JDK
Resolved Date:
2012-06-11
Component:
core-libs
OS:
linux
Sub-Component:
java.nio
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
AIX HY-AIX64 1 7 000562E4D700

A DESCRIPTION OF THE PROBLEM :
  From the man page said:
F_SETLK :
...... If a conflicting lock is held by another process, this call returns -1 and sets errno  to EACCES or EAGAIN.

So EACCESS should be also checked for the sake the system is not return EAGAIN.

The native code is in the file "src/solaris/native/sun/nio/ch/FileDispatcherImpl.c" and fix is very straight-forward.


REPRODUCIBILITY :
This bug can be reproduced always.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk8/tl/jdk/rev/de7f6d5841b6
                                     
2012-02-20



Hardware and Software, Engineered to Work Together