From f374b79e08e135de11def93005110a833686c5f7 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Mon, 1 Apr 2019 17:41:22 +0200 Subject: 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 --- ide/idetop.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ide') 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 = -- cgit v1.2.3