diff options
Diffstat (limited to 'TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp')
-rw-r--r-- | TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp deleted file mode 100644 index 394695123ad..00000000000 --- a/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/examples/Callback_Quoter -// -// = FILENAME -// Consumer_Input_Handler.cpp -// -// = DESCRIPTION -// Implementation of the Consumer_Signal_Handler class. -// -// = AUTHOR -// Kirthika Parameswaran <kirthika@cs.wustl.edu> -// -// =========================================================== - -#include "Consumer_Signal_Handler.h" - -Consumer_Signal_Handler::Consumer_Signal_Handler (Consumer_Handler *consumer_handler) - : consumer_handler_ (consumer_handler) -{ -} - -Consumer_Signal_Handler:: ~Consumer_Signal_Handler (void) -{ -} - -// Method to handle the ^C signal. -int -Consumer_Signal_Handler::handle_signal (int /* signum */, - siginfo_t*, - ucontext_t*) -{ - ACE_DEBUG ((LM_DEBUG, - " Exiting on receiving ^C\n")); - - quit_on_signal (); - - return 0; -} - -// Method called before the Event_Handler dies. -int -Consumer_Signal_Handler::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - // End of the signal handler. - delete this; - - return 0; -} - -int -Consumer_Signal_Handler::quit_on_signal (void) -{ - // Only if the consumer is registered and wants to shut down, its - // necessary to unregister and then shutdown. - - // CORBA::Environment TAO_TRY_ENV; - - ACE_TRY_NEW_ENV - { - if (consumer_handler_->unregistered_ != 1 - && consumer_handler_->registered_ == 1) - { - this->consumer_handler_->server_->unregister_callback - (this->consumer_handler_->consumer_var_.in ()); - ACE_DEBUG ((LM_DEBUG, - "Consumer Unregistered\n")); - ACE_TRY_CHECK; - } - this->consumer_handler_->consumer_servant_->shutdown - (ACE_TRY_ENV); - } - - ACE_CATCHANY - { - ACE_TRY_ENV.print_exception ("Consumer_Input_Handler::quit_consumer_process()"); - return -1; - } - ACE_ENDTRY; - - return 0; -} |