Unix.read exhibits two different behaviors on Windows vs Linux #7342
Original bug ID: 7342
Reading Didier and Xavier's excellent "Unix programming in OCaml" course, I performed a
Sadly, I was developing on Windows. It turns out that
Steps to reproduce
See the attached file.
# #use "Test.ml";; - : unit = () # run "ls" [||];; Exception: Unix.Unix_error (Unix.EPIPE, "read", "").
The workaround is to remove the "when false" clause in Test.ml.
I can submit a pull request that wraps otherlibs/win32unix/unix.ml:read with that exact try-catch block, or I can submit a documentation request that documents this caveat. Any preference?