Commits

Stephen Weeks committed 088bb4c

work around bug in Sys.uname that causes permissions problem with /tmp/uname.out

Comments (0)

Files changed (1)

ocaml/omake/omake_inotify.ml

 
 exception Error = Inotify.Error
 
-let inotify = match Lazy.force Sys.uname with
+(* CR sweeks: In Core 108.02 [Sys.uname] is broken because it tries to write
+   "/tmp/uname.out", which fails on a shared machine due to permissions, if multiple
+   people are trying to write that file.  For now, in I've changed this to assume Linux.
+   Core 108.07 replaces [Sys.uname] with [Unix.uname], which makes the syscall directly
+   rather than shelling out, and so avoids the problem.  Rather than work around the
+   broken [Sys.uname] in Core 108.02, I propose upgrading jane-elisp to use Core
+   108.07. *)
+let inotify = match `Linux (* Lazy.force Sys.uname *) with
 | `Linux -> Ok (module Inotify : Inotify)
 | `Darwin -> Or_error.error_string "Inotify is unsupported on Darwin."
 | `Unknown -> Or_error.error_string "Inotify is unsupported on this operating system."