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 *)
requests until it will get killed by father *)
let d_spec = Http_daemon.daemon_spec
~port ~mode:`Fork
- ~callback:(callback ~syslogger ~styles ~cmd_pipe ~res_pipe ()) ()
+ ~callback:(callback ~syslogger ~styles ~cmd_pipe ~res_pipe ())
+ ~auto_close:true ()
in
Http_daemon.main d_spec
| _ (* < 0 *) -> (* fork failed :-((( *)