I'm trying to read the output from GPG. It works on Linux but not on Windows. Here's a simple test case:
let () =
let out = Lwt_main.run (Lwt_process.pread ("", [| "gpg"; "--version" |])) in
print_endline ("Got: " ^ out)
On Linux:
Got: gpg (GnuPG) 2.0.21
...
On Windows (Windows 7, OCaml 4.00.1, LWT 2.4.3, MinGW 32-bit):
Fatal error: exception Unix.Unix_error(31, "bytes_read", "")