2005-03-17 Miguel de Icaza <miguel@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 17 Mar 2005 20:46:40 +0000 (20:46 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 17 Mar 2005 20:46:40 +0000 (20:46 -0000)
* io.c: don't fail on NFS when there are no more locks available.

svn path=/trunk/mono/; revision=41961

mono/io-layer/ChangeLog
mono/io-layer/io.c

index d55ec04fb4a9b8ede98a0cc9f32ca19f8f7cec8e..6ea98810eac8fac7ae741d777f67c3bb8557b17c 100644 (file)
@@ -1,3 +1,7 @@
+2005-03-17 Miguel de Icaza <miguel@novell.com>
+
+       * io.c: don't fail on NFS when there are no more locks available.
+
 2005-03-09  Dick Porter  <dick@ximian.com>
 
        * error.c (_wapi_get_win32_file_error): ENFILE and EMFILE should
index 4cb31b69439b757ffc71ede1dc0d9bb6f446f3ca..86bad7f756cefbcde416bd76b8f3d71b5d3dcb9a 100644 (file)
@@ -4174,6 +4174,12 @@ static gboolean _wapi_lock_file_region (int fd, off_t offset, off_t length)
 #endif
 
        if (ret == -1) {
+               /*
+                * if locks are not available (NFS for example), ignore the error
+                */
+               if (errno == ENOLCK)
+                       return (TRUE);
+
                SetLastError (ERROR_LOCK_VIOLATION);
                return(FALSE);
        }