From: Stefano Zacchiroli Date: Thu, 19 May 2005 09:39:51 +0000 (+0000) Subject: - die on CTRL-C or init.d/... stop instead of resurrecting X-Git-Tag: single_binding~38 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6bc7eb234bb3a9d015537a75a84f4ce029b41516;p=helm.git - die on CTRL-C or init.d/... stop instead of resurrecting - added (commented) debugging code to save xml document --- diff --git a/helm/uwobo/uwobo.ml b/helm/uwobo/uwobo.ml index d8341aeb6..ec5cc5203 100644 --- a/helm/uwobo/uwobo.ml +++ b/helm/uwobo/uwobo.ml @@ -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 *)