From 62807372f1e3f78dffc02c07b0b801d4d8f4a78f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 4 Aug 2014 16:23:12 +0200 Subject: Coqide: check_connection now also checks correct loading of coqide plugin + reports errors also from stderr. --- ide/coq.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ide/coq.ml b/ide/coq.ml index e8e925e447..aba4634887 100644 --- a/ide/coq.ml +++ b/ide/coq.ml @@ -151,12 +151,12 @@ let print_status = function let check_connection args = let lines = ref [] in let argstr = String.concat " " (List.map Filename.quote args) in - let cmd = Filename.quote (coqtop_path ()) ^ " -batch " ^ argstr in + let cmd = Filename.quote (coqtop_path ()) ^ " -batch -ideslave " ^ argstr in let cmd = requote cmd in try - let ic = Unix.open_process_in cmd in - lines := read_all_lines ic; - match Unix.close_process_in ic with + let oc,ic,ec = Unix.open_process_full cmd (Unix.environment ()) in + lines := read_all_lines oc @ read_all_lines ec; + match Unix.close_process_full (oc,ic,ec) with | Unix.WEXITED 0 -> () (* coqtop seems ok *) | st -> raise (WrongExitStatus (print_status st)) with e -> connection_error cmd !lines e -- cgit v1.2.3