]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/uwobo.ml
- die on CTRL-C or init.d/... stop instead of resurrecting
[helm.git] / helm / uwobo / uwobo.ml
index d8341aeb6d924b3fd77cd979f75c492cd3cd1e33..ec5cc52031656979f986efa852d6d654a1dc1090 100644 (file)
@@ -517,6 +517,10 @@ let callback
         syslogger#log `Debug (sprintf "Parsing input document %s ..." xmluri);
         let domImpl = Gdome.domImplementation () in
         let input = domImpl#createDocumentFromURI ~uri:xmluri () in
+(*
+let _ = domImpl#saveDocumentToFile ~doc:input ~name:"/tmp/uwobo_doc.xml" () in
+let _ = let oc = open_out "/tmp/uwobo_uri.txt" in output_string oc xmluri; close_out oc in
+*)
         syslogger#log `Debug "Applying stylesheet chain ...";
         (try
           let (write_result, media_type, encoding) = (* out_channel -> unit *)
@@ -772,9 +776,10 @@ let main () =
                   (sprintf "Ignoring invalid interprocess command: '%s'" cmd))
           done
         with
-          Restart_HTTP_daemon ->
+        | Restart_HTTP_daemon ->
             close_in cmd_pipe;  (* these calls close also fds *)
             close_out res_pipe
+         | Sys.Break as exn -> raise exn
         | e -> (* Should we return a 404 error here? Maybe... (how?) *)
            output_string res_pipe (Printexc.to_string e);
             close_in cmd_pipe;  (* these calls close also fds *)