diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-30 06:50:29 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-30 06:50:29 +0000 |
commit | a5c4d8047ab58df5c45092e18ae503ad40518f0e (patch) | |
tree | daa1ac46caf738dfe049fd5ca5eafc0eb84a0eb0 /netsvcs/servers | |
parent | 645a9c1a4457349320e62d85af49f62e80da53c0 (diff) | |
download | ATCD-a5c4d8047ab58df5c45092e18ae503ad40518f0e.tar.gz |
foo
Diffstat (limited to 'netsvcs/servers')
-rw-r--r-- | netsvcs/servers/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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. |