]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/daemons/proofChecker/proofChecker.ml
severe bug found in parallel zeta
[helm.git] / helm / software / daemons / proofChecker / proofChecker.ml
index 928881373470067ba133aafdb34fb76427809d30..2928cf6484b4a85ea0daefe48d36aab6261fa305 100644 (file)
@@ -92,7 +92,7 @@ let _ =
     flush !outchan)
 ;;
 
-let callback ((req : Http_types.request), outchan') =
+let callback (req : Http_types.request) outchan' =
   match req#path with
   | "/proofCheck" ->
       begin
@@ -107,7 +107,8 @@ let callback ((req : Http_types.request), outchan') =
           fprintf outchan' "%s" (html_preamble uri);
           flush outchan';
           (try
-            ignore (CicTypeChecker.typecheck (UriManager.uri_of_string uri));
+            ignore (CicTypeChecker.typecheck ~trust:false 
+              (UriManager.uri_of_string uri));
            with e ->
             fprintf outchan' "%s\n" (Printexc.to_string e);
             flush outchan');
@@ -125,17 +126,11 @@ let callback ((req : Http_types.request), outchan') =
 
 in
 
-let callback req ch =
-  HExtlib.finally
-    (fun () -> try close_out ch with Sys_error _ -> ())
-    callback (req, ch)
-
-in
 
 printf "Proof Checker started and listening on port %d\n" port;
 flush stdout;
 CicEnvironment.set_trust (fun _ -> false);
-let d_spec = Http_daemon.daemon_spec ~port ~mode:`Fork ~callback () in
+let d_spec = Http_daemon.daemon_spec ~port ~mode:`Fork ~callback ~auto_close:true () in
 Http_daemon.main d_spec;
 printf "Proof Checker is terminating, bye!\n"