]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/src/ocaml/uwobo.ml
catch SIGTERM and log a "bye" message
[helm.git] / helm / uwobo / src / ocaml / uwobo.ml
index a08e765678376498bf1df6d8b259213302071d43..792e3e64ace55c57b448dff37256c87b4110682e 100644 (file)
@@ -240,6 +240,8 @@ let main () =
     end
   in
   at_exit die_nice;
+  ignore (Sys.signal Sys.sigterm
+    (Sys.Signal_handle (fun _ -> raise Sys.Break)));
   syslogger#log `Notice
     (sprintf "%s started and listening on port %d" daemon_name port);
   syslogger#log `Notice (sprintf "current directory is %s" (Sys.getcwd ()));