diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-02-21 00:14:13 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-02-21 00:14:13 +0100 |
commit | c5d0aa889fa80404f6c291000938e443d6200e5b (patch) | |
tree | 253fbb6ebe405b78b5e66a1e1f7d4da606dbfa78 /ide/coq.ml | |
parent | a4b457bef4290fed3f2869795f1539de53b3805a (diff) | |
parent | e54d014ce10dea4a74b66e5091d25e4b26bd71fa (diff) |
Merge branch 'v8.5'
Diffstat (limited to 'ide/coq.ml')
-rw-r--r-- | ide/coq.ml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ide/coq.ml b/ide/coq.ml index 0fe316b56..fa0adf979 100644 --- a/ide/coq.ml +++ b/ide/coq.ml @@ -460,10 +460,6 @@ let close_coqtop coqtop = let reset_coqtop coqtop = respawn_coqtop ~why:Planned coqtop -let break_coqtop coqtop = - try !interrupter (CoqTop.unixpid coqtop.handle.proc) - with _ -> Minilib.log "Error while sending Ctrl-C" - let get_arguments coqtop = coqtop.sup_args let set_arguments coqtop args = @@ -513,6 +509,17 @@ let search flags = eval_call (Xmlprotocol.search flags) let init x = eval_call (Xmlprotocol.init x) let stop_worker x = eval_call (Xmlprotocol.stop_worker x) +let break_coqtop coqtop workers = + if coqtop.status = Busy then + try !interrupter (CoqTop.unixpid coqtop.handle.proc) + with _ -> Minilib.log "Error while sending Ctrl-C" + else + let rec aux = function + | [] -> Void + | w :: ws -> stop_worker w coqtop.handle (fun _ -> aux ws) + in + let Void = aux workers in () + module PrintOpt = struct type t = string list |