1 (* 'top'-like tool for libvirt domains.
3 * Just contains the main function.
10 (* Note: make sure we catch any exceptions and clean up the display.
12 * Note (2): make sure all exit paths call the GC so that we can check
13 * that all allocated resources are being counted properly (by running
14 * the program under --debug ...).
17 let setup = start_up () in
24 | Libvirt.Virterror err ->
26 prerr_endline (Libvirt.Virterror.to_string err);
30 prerr_endline ("Error: " ^ Printexc.to_string exn);
34 Gc.compact (); (* See note above. *)
36 exit (if error then 1 else 0)