]> matita.cs.unibo.it Git - helm.git/blobdiff - daemons/uwobo/uwobo.ml
Full specification of find. Added notation for If_Then_Else. Probably a delta
[helm.git] / daemons / uwobo / uwobo.ml
index 9553177d774ed0236734c70d4d2408da81046fc6..e7aa1e8f9fc478d8589c3bf749f5a98aa1340280 100644 (file)
@@ -566,13 +566,6 @@ let callback
       return_error ("Uncaught exception: " ^ (Printexc.to_string exc)) outchan
 ;;
 
-let callback
-  ~syslogger ~styles ~cmd_pipe ~res_pipe () (req: Http_types.request) outchan
-=
-  HExtlib.finally
-    (fun () -> try close_out outchan with Sys_error _ -> ())
-    (callback ~syslogger ~styles ~cmd_pipe ~res_pipe () req) outchan
-
   (* UWOBO's startup *)
 let main () =
     (* (1) system logger *)
@@ -807,8 +800,12 @@ let main () =
         debug_print (sprintf "Starting HTTP daemon on port %d ..." port);
           (* next invocation doesn't return, process will keep on serving HTTP
           requests until it will get killed by father *)
-        Http_daemon.start'~port ~mode:`Fork
-          (callback ~syslogger ~styles ~cmd_pipe ~res_pipe ())
+        let d_spec = Http_daemon.daemon_spec
+            ~port ~mode:`Fork
+            ~callback:(callback ~syslogger ~styles ~cmd_pipe ~res_pipe ())
+            ~auto_close:true ()
+        in
+        Http_daemon.main d_spec
     | _ (* < 0 *) ->  (* fork failed :-((( *)
         failwith "Can't fork :-("
   done