Alexander Pyhalov
2016-09-27 e2ca119c548afef5f7e109694b812e0bba91f168
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
Patch from Desktop team that fixes a NFS issue.
http://caml.inria.fr/mantis/view.php?id=4663
 
diff -urN ocaml-3.11.2/byterun/io.c ocaml-3.11.2.new/byterun/io.c
--- ocaml-3.11.2/byterun/io.c    2011-04-07 13:41:41.040436216 +0800
+++ ocaml-3.11.2.new/byterun/io.c    2011-04-07 13:42:50.119747390 +0800
@@ -479,6 +479,9 @@
   struct channel * channel = Channel(vchannel);
   if (channel->fd != -1){
     result = close(channel->fd);
+    /* Work around an NFS issue that causes close() to fails with EINVAL */
+    if ((result < 0) && (errno == EINVAL))
+      result = 0;
     channel->fd = -1;
   }else{
     result = 0;