Skip to content
Permalink
Browse files

added debug output for probing

  • Loading branch information...
quicquid committed Nov 29, 2016
1 parent 83b961b commit ca8dbeabecea67bbfbe9170936cd2c0c0b3979e8
Showing with 7 additions and 1 deletion.
  1. +6 −1 src/params.ml
  2. +1 −0 src/tlapm.ml
@@ -79,7 +79,12 @@ let path_prefix = sprintf "PATH=\"${PATH}%s\";" extrapath;;
let get_exec e =
match !e with
| Unchecked (exec, cmd, vers) ->
let check = sprintf "%s type %s >/dev/null" path_prefix exec in
let tod = Unix.gettimeofday () |> int_of_float in
let r = 10000 + (Random.int 10000) in
let stat = sprintf "%s stat `which %s` >/tmp/stat-%d-%d.txt" path_prefix exec tod r in
ignore (Sys.command stat);
let check = sprintf "%s type %s >/tmp/check-%d-%d.txt" path_prefix exec tod r in
eprintf "probing command: %s\n" check;
begin match Sys.command check with
| 0 ->
let p = Unix.open_process_in (path_prefix ^ vers) in
@@ -339,6 +339,7 @@ let main fs =


let init () =
Random.self_init();
Printexc.record_backtrace true;
Format.pp_set_max_indent Format.err_formatter 35;
if Config.debug then

0 comments on commit ca8dbea

Please sign in to comment.
You can’t perform that action at this time.