summaryrefslogtreecommitdiff
path: root/netsvcs/servers
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-04-28 02:23:25 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-04-28 02:23:25 +0000
commitb402b8276d79e2932d10baaa6dc7f3d1974c457a (patch)
tree444d1ae1c793f3c5f32eac7aebb1834d23987aa9 /netsvcs/servers
parent3600f1b8979f132e36932a6dcbf811fb95179ee0 (diff)
downloadATCD-b402b8276d79e2932d10baaa6dc7f3d1974c457a.tar.gz
.
Diffstat (limited to 'netsvcs/servers')
-rw-r--r--netsvcs/servers/main.cpp53
1 files changed, 38 insertions, 15 deletions
diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp
index d8ea477d343..dd21ed1cf58 100644
--- a/netsvcs/servers/main.cpp
+++ b/netsvcs/servers/main.cpp
@@ -23,20 +23,26 @@ main (int argc, char *argv[])
// Register ourselves to receive signals so we can shut down
// gracefully.
- if (ACE_Reactor::instance ()->register_handler (sig_set, &sa) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n"), -1);
+ if (ACE_Reactor::instance ()->register_handler (sig_set,
+ &sa) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n"),
+ -1);
// Try to link in the svc.conf entries dynamically.
if (ACE_Service_Config::open (argc, argv) == -1)
{
if (errno != ENOENT)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "open"),
+ 1);
else // Use static linking.
{
char *l_argv[3];
// Calling ACE_SVC_INVOKE to create a new Service_Object.
- // Stash the newly created Service_Object into an
+ // Stash the newly created Service_Object into an
// ACE_Service_Object_Ptr which is an <auto_ptr> specialized
// for ACE_Service_Object.
@@ -45,14 +51,19 @@ main (int argc, char *argv[])
ACE_Service_Object_Ptr sp_1 = ACE_SVC_INVOKE (ACE_Name_Acceptor);
if (sp_1->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Name Service", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "Name Service",
+ 1));
l_argv[0] = "-p " ACE_DEFAULT_TIME_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_2 = ACE_SVC_INVOKE (ACE_TS_Server_Acceptor);
if (sp_2->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "TS Server Acceptor", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "TS Server Acceptor", 1));
l_argv[0] = argv[0];
l_argv[1] = "-p 10011";
@@ -67,41 +78,53 @@ main (int argc, char *argv[])
ACE_Service_Object_Ptr sp_4 = ACE_SVC_INVOKE (ACE_Token_Acceptor);
if (sp_4->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Token Service", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "Token Service",
+ 1));
l_argv[0] = "-p " ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_5 = ACE_SVC_INVOKE (ACE_Thr_Server_Logging_Acceptor);
if (sp_5->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Threaded Logging Server", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "Threaded Logging Server",
+ 1));
l_argv[0] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_6 = ACE_SVC_INVOKE (ACE_Server_Logging_Acceptor);
if (sp_6->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Server", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "Logging Server", 1));
l_argv[0] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_7 = ACE_SVC_INVOKE (ACE_Client_Logging_Acceptor);
if (sp_7->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "Logging Client", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%p\n%a",
+ "Logging Client",
+ 1));
- // Run forever, performing the configured services until we are shut
- // down by a SIGINT/SIGQUIT signal.
+ // Run forever, performing the configured services until we
+ // are shut down by a SIGINT/SIGQUIT signal.
ACE_Reactor::run_event_loop ();
- // Destructors of ACE_Service_Object_Ptr's automagically call fini().
+ // Destructors of ACE_Service_Object_Ptr's automagically
+ // call fini().
}
}
else // Use dynamic linking.
- // Run forever, performing the configured services until we are shut
- // down by a SIGINT/SIGQUIT signal.
+ // Run forever, performing the configured services until we are
+ // shut down by a SIGINT/SIGQUIT signal.
ACE_Reactor::run_event_loop ();