2 #include "orbsvcs/Log_Macros.h"
3 #include "IFR_Service.h"
4 #include "tao/Environment.h"
5 #include "orbsvcs/Shutdown_Utilities.h"
7 class IFR_Service_Shutdown_Functor
: public Shutdown_Functor
10 IFR_Service_Shutdown_Functor (IFR_Service
& ifr
);
12 void operator() (int which_signal
);
17 IFR_Service_Shutdown_Functor::IFR_Service_Shutdown_Functor (IFR_Service
&ifr
)
23 IFR_Service_Shutdown_Functor::operator() (int which_signal
)
25 if (TAO_debug_level
> 0)
26 ORBSVCS_DEBUG ((LM_DEBUG
,
27 "shutting down on signal %d\n", which_signal
));
28 (void) this->ifr_
.shutdown ();
32 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
36 IFR_Service_Shutdown_Functor
killer (server
);
37 Service_Shutdown
kill_contractor (killer
);
41 int status
= server
.init (argc
, argv
);
51 status
= server
.fini ();
59 catch (const CORBA::SystemException
& sysex
)
61 sysex
._tao_print_exception ("System Exception");
64 catch (const CORBA::Exception
& ex
)
66 ex
._tao_print_exception ("Unknown Exception");