From a5c4d8047ab58df5c45092e18ae503ad40518f0e Mon Sep 17 00:00:00 2001 From: schmidt Date: Mon, 30 Dec 1996 06:50:29 +0000 Subject: foo --- netsvcs/servers/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'netsvcs/servers') diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp index c072d012211..130b7f1ab30 100644 --- a/netsvcs/servers/main.cpp +++ b/netsvcs/servers/main.cpp @@ -1,6 +1,6 @@ -#include "ace/Service_Config.h" // $Id$ +#include "ace/Service_Config.h" #include "TS_Clerk_Handler.h" #include "TS_Server_Handler.h" #include "Client_Logging_Handler.h" @@ -69,6 +69,17 @@ main (int argc, char *argv[]) } } + // Create an adapter to end the event loop. + ACE_Sig_Adapter sa ((ACE_Sig_Handler_Ex) ACE_Service_Config::end_reactor_event_loop); + + ACE_Sig_Set sig_set; + sig_set.sig_add (SIGINT); + sig_set.sig_add (SIGQUIT); + + // Register ourselves to receive SIGINT and SIGQUIT so we can shut + // down gracefully via signals. + ACE_Service_Config::reactor ()->register_handler (sig_set, &sa); + // Run forever, performing the configured services until we are shut // down by a SIGINT/SIGQUIT signal. -- cgit v1.2.1