Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit b9132981 authored by Andrei Paskevich's avatar Andrei Paskevich

Autodetection: remove temporary output files

parent 52580155
......@@ -234,22 +234,21 @@ let sanitize_exec =
let ask_prover_version exec_name version_switch =
let out = Filename.temp_file "out" "" in
let cmd = sprintf "%s %s" exec_name version_switch in
let c = sprintf "(%s) > %s 2>&1" cmd out in
let c = sprintf "(%s) >%s 2>&1" cmd out in
Debug.dprintf debug "Run : %s@." c;
let ret = Sys.command c in
if ret <> 0 then
begin
Debug.dprintf debug "command '%s' failed@." cmd;
try
let ret = Sys.command c in
let ch = open_in out in
let c = Sysutil.channel_contents ch in
close_in ch;
Sys.remove out;
if ret <> 0 then begin
Debug.dprintf debug "command '%s' failed. Output:@\n%s@." cmd c;
None
end
else
try
let ch = open_in out in
let c = Sysutil.channel_contents ch in
close_in ch;
Sys.remove out;
Some c
with Not_found | End_of_file -> Some ""
end else Some c
with Not_found | End_of_file | Sys_error _ ->
Debug.dprintf debug "command '%s' failed@." cmd;
None
let ask_prover_version env exec_name version_switch =
try
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment