Skip to content

Commit

Permalink
added debug output for probing
Browse files Browse the repository at this point in the history
  • Loading branch information
quicquid committed Dec 8, 2017
1 parent 83b961b commit ca8dbea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/params.ml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tlapm.ml
Expand Up @@ -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
Expand Down

0 comments on commit ca8dbea

Please sign in to comment.