changeset 6043:710227d2d966

7146506: (fc) Add EACCES check to the return of fcntl native method Summary: Add EACCES check according to the spec of fcntl Reviewed-by: alanb
author littlee
date Mon, 20 Feb 2012 11:24:06 +0800
parents 45ef4cd48167
children 38be58d6ee94
files src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c	Thu Nov 17 10:32:05 2011 -0800
+++ b/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c	Mon Feb 20 11:24:06 2012 +0800
@@ -206,7 +206,7 @@
     }
     lockResult = fcntl(fd, cmd, &fl);
     if (lockResult < 0) {
-        if ((cmd == F_SETLK64) && (errno == EAGAIN))
+        if ((cmd == F_SETLK64) && (errno == EAGAIN || errno == EACCES))
             return sun_nio_ch_FileDispatcherImpl_NO_LOCK;
         if (errno == EINTR)
             return sun_nio_ch_FileDispatcherImpl_INTERRUPTED;