X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fdaemons%2Fgraphs%2Ftools%2FdrawGraph.ml;h=dc6bc42d8f6acf3f68c4099823c22698c3d20eb6;hb=31be09cc0d040577917783e050e1d38c0daa8f01;hp=0dc9800fe1c3dac2f226d1ce74dda762c7f8e9dd;hpb=27da4233974f10392fce1cf8e91790b282a44c92;p=helm.git diff --git a/helm/software/daemons/graphs/tools/drawGraph.ml b/helm/software/daemons/graphs/tools/drawGraph.ml index 0dc9800fe..dc6bc42d8 100644 --- a/helm/software/daemons/graphs/tools/drawGraph.ml +++ b/helm/software/daemons/graphs/tools/drawGraph.ml @@ -56,7 +56,7 @@ let string_of_exit_status = function | Unix.WSIGNALED n -> sprintf "Process killed by signal %d" n | Unix.WSTOPPED n -> sprintf "Process stopped by signal %d" n in -let callback ((req: Http_types.request), outchan) = +let callback (req: Http_types.request) outchan = try (match req#path with | "/draw" -> @@ -90,18 +90,13 @@ let callback ((req: Http_types.request), outchan) = ~body:(sprintf "Parameter '%s' is missing" attr_name) outchan in -let callback req ch = - HExtlib.finally - (fun () -> try close_out ch with Sys_error _ -> ()) - callback (req, ch) -in Helm_registry.load_from configuration_file; let port = Helm_registry.get_int "draw_graph.port" in Sys.chdir (Helm_registry.get "draw_graph.dir"); printf "%s started and listening on port %d\n" daemon_name port; printf "current directory is %s\n" (Sys.getcwd ()); flush stdout; -let d_spec = Http_daemon.daemon_spec ~port ~callback () in +let d_spec = Http_daemon.daemon_spec ~port ~callback ~auto_close:true () in Http_daemon.main d_spec; printf "%s is terminating, bye!\n" daemon_name