summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-23 00:06:39 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-23 00:06:39 +0000
commit4ec5abbb56bdd664103a1f3727afc3647747bcfb (patch)
tree2b2d990e9fd094c2616e4d44d83ccdc38a4ce19e
parent92cbe4f7fca8e568e0361029ea7ee0660406e9bd (diff)
downloadATCD-4ec5abbb56bdd664103a1f3727afc3647747bcfb.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b2
-rw-r--r--ace/Service_Config.cpp63
-rw-r--r--ace/Service_Config.h15
3 files changed, 52 insertions, 28 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index 6528f7e51f5..f51a72a1125 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -657,7 +657,7 @@ Tue Aug 11 02:06:55 1998 Irfan Pyarali <irfan@cs.wustl.edu>
* ace/WFMO_Reactor.cpp (dispatch_handles): Because dispatch_index
is absolute, nCount should be set to
(max_handlep1 - dispatch_index) instead of (nCount -
- dispatch_index). Thanks to "Alberto Villarica"
+ dispatch_index). Thanks to Alberto Villarica
<Alberto.Villarica.rav@nt.com> for pointing this out.
Mon Aug 10 20:12:21 1998 Steve Huston <shuston@riverace.com>
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index b7f9fd7caa6..54b6d542eb6 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -240,7 +240,8 @@ ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
if (ACE_Service_Config::svc_queue_->enqueue_head
(ACE_CString (getopt.optarg)) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"), "enqueue_head"));
+ ASYS_TEXT ("%p\n"),
+ "enqueue_head"));
break;
default:
ACE_ERROR ((LM_ERROR,
@@ -261,15 +262,23 @@ ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
ACE_Service_Type *srp = 0;
if (ACE_Service_Config::debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("opening static service %s\n"), svc_name));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("opening static service %s\n"),
+ svc_name));
if (ACE_Service_Repository::instance ()->find (svc_name,
(const ACE_Service_Type **) &srp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%s not found\n"), svc_name), -1);
-
- else if (srp->type ()->init (args.argc (), args.argv ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("static initialization failed, %p\n"),
- svc_name), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%s not found\n"),
+ svc_name),
+ -1);
+
+ else if (srp->type ()->init (args.argc (),
+ args.argv ()) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("static initialization failed, %p\n"),
+ svc_name),
+ -1);
else
{
srp->active (1);
@@ -288,14 +297,20 @@ ACE_Service_Config::initialize (const ACE_Service_Type *sr,
ACE_ARGV args (parameters);
if (ACE_Service_Config::debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("opening dynamic service %s\n"), sr->name ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("opening dynamic service %s\n"),
+ sr->name ()));
if (ACE_Service_Repository::instance ()->insert (sr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("insertion failed, %p\n"), sr->name ()), -1);
-
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("insertion failed, %p\n"),
+ sr->name ()),
+ -1);
else if (sr->type ()->init (args.argc (), args.argv ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("dynamic initialization failed for %s\n"),
- sr->name ()), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("dynamic initialization failed for %s\n"),
+ sr->name ()),
+ -1);
else
return 0;
}
@@ -303,7 +318,6 @@ ACE_Service_Config::initialize (const ACE_Service_Type *sr,
int
ACE_Service_Config::process_directives_i (void)
{
-
// AC 970827 Skip the heap check because yacc allocates a buffer
// here which will be reported as a memory leak for some reason.
ACE_NO_HEAP_CHECK
@@ -316,7 +330,9 @@ ACE_Service_Config::process_directives_i (void)
// Use an auto_ptr to make sure that we release this memory
// regardless of how we exit...
- ACE_NEW_RETURN (ace_obstack, ACE_Obstack, -1);
+ ACE_NEW_RETURN (ace_obstack,
+ ACE_Obstack,
+ -1);
auto_ptr<ACE_Obstack> holder (ace_obstack);
@@ -481,7 +497,8 @@ ACE_Service_Config::open (const ASYS_TCHAR program_name[],
else
{
if (ACE_Service_Config::debug_)
- ACE_DEBUG ((LM_STARTUP, ASYS_TEXT ("starting up daemon %n\n")));
+ ACE_DEBUG ((LM_STARTUP,
+ ASYS_TEXT ("starting up daemon %n\n")));
// Initialize the Service Repository (this will still work if
// user forgets to define an object of type ACE_Service_Config).
@@ -529,7 +546,8 @@ ACE_Service_Config::ACE_Service_Config (const ASYS_TCHAR program_name[],
&& errno != ENOENT)
// Only print out an error if it wasn't the svc.conf file that was
// missing.
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), program_name));
+ ACE_ERROR ((LM_ERROR,
+ ASYS_TEXT ("%p\n"), program_name));
}
// Signal handling API to trigger dynamic reconfiguration.
@@ -542,10 +560,13 @@ ACE_Service_Config::handle_signal (int sig, siginfo_t *, ucontext_t *)
if (ACE_Service_Config::signum_ != sig)
ACE_ERROR ((LM_ERROR,
ASYS_TEXT ("error, signal %S does match %S\n"),
- sig, ACE_Service_Config::signum_));
+ sig,
+ ACE_Service_Config::signum_));
if (ACE_Service_Config::debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("signal %S occurred\n"), sig));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("signal %S occurred\n"),
+ sig));
ACE_Service_Config::reconfig_occurred_ = 1;
}
@@ -563,7 +584,9 @@ ACE_Service_Config::reconfigure (void)
{
time_t t = ACE_OS::time (0);
if (ACE_Service_Config::debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("beginning reconfiguration at %s"), ACE_OS::ctime (&t)));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("beginning reconfiguration at %s"),
+ ACE_OS::ctime (&t)));
}
if (ACE_Service_Config::process_directives () == -1)
@@ -706,7 +729,7 @@ ACE_Service_Config::reconfig_occurred (int config_occurred)
ACE_Service_Config::reconfig_occurred_ = config_occurred;
}
-// Become a daemon (i.e., run as a ASYS_TEXT ("background") process).
+// Become a daemon (i.e., run as a "background" process).
int
ACE_Service_Config::start_daemon (void)
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
index 1464c42efbb..f531a868b06 100644
--- a/ace/Service_Config.h
+++ b/ace/Service_Config.h
@@ -231,13 +231,14 @@ public:
// DO NOT USE THIS METHOD. It may be unsupported in future releases.
// Use ACE_Allocator::instance() instead.
- // = Member functions used by various other parts
- // of the Service Configurator class category.
- static int initialize (const ACE_Service_Type *, ASYS_TCHAR parameters[]);
- // Dynamically link the shared object file and retrieve
- // a pointer to the designated shared object in this file.
-
- static int initialize (const ASYS_TCHAR svc_name[], ASYS_TCHAR parameters[]);
+ // = Utility methods.
+ static int initialize (const ACE_Service_Type *,
+ ASYS_TCHAR parameters[]);
+ // Dynamically link the shared object file and retrieve a pointer to
+ // the designated shared object in this file.
+
+ static int initialize (const ASYS_TCHAR svc_name[],
+ ASYS_TCHAR parameters[]);
// Initialize and activate a statically <svc_name> service.
static int resume (const ASYS_TCHAR svc_name[]);