File : adagio-startup.ads


with Ada.Interrupts.Names;
use  Ada.Interrupts.Names;

package Adagio.Startup is

   procedure Init;
   -- Initialization

   
   procedure Shutdown;
   -- Performs finalization   


   procedure Set_Web_Stats;
   -- Some web stats for gui use


   -------------------

   -- Interruptions --

   -------------------

   protected Interruptions_handler is
      -- Configuration reload

      procedure Int_Config;
      pragma Interrupt_Handler (Int_Config);
      pragma Attach_Handler    (Int_Config, SIGHUP);

      -- Orderly shutdowns

      procedure Int_Quit;
      pragma Interrupt_handler (Int_Quit);
      pragma Attach_handler    (Int_Quit, SIGTERM);

      -- High distress protection faults! 

      procedure Int_Seg_Violation;
      pragma Interrupt_handler (Int_Seg_Violation);
      -- pragma Attach_handler (Int_Seg, SIGSEGV);

   end Interruptions_handler;

end Adagio.Startup;