aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorMaxime Dénès2019-04-01 17:41:22 +0200
committerMaxime Dénès2019-04-03 12:01:25 +0200
commitf374b79e08e135de11def93005110a833686c5f7 (patch)
tree5b48870361b12c53f254381cbf809e2697e5e5ef /ide
parentb45d4425b760b4e6346df4ea19f24d5c1e84b911 (diff)
Protect some I/O routines from SIGALRM
This is necessary to prevent Coq from sending ill-formed output in some scenarios involving `Timeout`. Co-authored-by: Enrico Tassi <Enrico.Tassi@inria.fr>
Diffstat (limited to 'ide')
-rw-r--r--ide/idetop.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/ide/idetop.ml b/ide/idetop.ml
index f744ce2ee3..10b8a2cdc5 100644
--- a/ide/idetop.ml
+++ b/ide/idetop.ml
@@ -466,7 +466,7 @@ let print_xml =
let m = Mutex.create () in
fun oc xml ->
Mutex.lock m;
- try Xml_printer.print oc xml; Mutex.unlock m
+ try Control.protect_sigalrm (Xml_printer.print oc) xml; Mutex.unlock m
with e -> let e = CErrors.push e in Mutex.unlock m; iraise e
let slave_feeder fmt xml_oc msg =