From 6a6054b64687b542372fdf25fbc613e9e1deb4c8 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 19 Jul 2006 10:04:02 +0000 Subject: [PATCH] Ctr-C now cleans up (with a nice warning :-) --- helm/software/matita/matita.ml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/helm/software/matita/matita.ml b/helm/software/matita/matita.ml index 164518426..a70063f5f 100644 --- a/helm/software/matita/matita.ml +++ b/helm/software/matita/matita.ml @@ -252,6 +252,18 @@ let _ = end; try GtkThread.main () - with Sys.Break -> () + with Sys.Break -> + Sys.set_signal Sys.sigint + (Sys.Signal_handle + (fun _ -> + prerr_endline "Still cleaning the library: don't be impatient!")); + prerr_endline "Matita is cleaning up. Please wait."; + try + let baseuri = + GrafiteTypes.get_string_option + (MatitaScript.current ())#grafite_status "baseuri" + in + LibraryClean.clean_baseuris [baseuri] + with GrafiteTypes.Option_error _ -> () (* vim:set foldmethod=marker: *) -- 2.39.2