diff options
author | doccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-10-13 21:01:51 +0000 |
---|---|---|
committer | doccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-10-13 21:01:51 +0000 |
commit | f946e249923a2624aef3e19d73126191104de86a (patch) | |
tree | c0a793c2719b9003a7d4940dc9b62d5b3afcc745 /ace/Process_Manager.cpp | |
parent | 7d2473f72e5d0b5b780ea3258c10ed5678f6fe4d (diff) | |
download | ATCD-f946e249923a2624aef3e19d73126191104de86a.tar.gz |
ChangeLogTag: Fri Oct 13 13:57:40 2000 Priyanka Gontla <pgontla@ece.uci.edu>
Diffstat (limited to 'ace/Process_Manager.cpp')
-rw-r--r-- | ace/Process_Manager.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp index afde854da19..cce3aa3f349 100644 --- a/ace/Process_Manager.cpp +++ b/ace/Process_Manager.cpp @@ -14,6 +14,20 @@ ACE_RCSID(ace, Process_Manager, "$Id$") +#if defined (ACE_HAS_SIG_C_FUNC) +extern "C" void +ACE_Process_Manager_cleanup (void *instance, void *arg) +{ + ACE_Process_Manager::cleanup (instance, arg); +} +#endif + +void +ACE_Process_Manager::cleanup (void *, void *) +{ + ACE_Process_Manager::close_singleton (); +} + class ACE_Managed_Process : public ACE_Process { // = TITLE @@ -114,6 +128,21 @@ ACE_Process_Manager::instance (void) ACE_Process_Manager, 0); ACE_Process_Manager::delete_instance_ = 1; + + // Register with the Object_Manager so that the wrapper to + // delete the proactor will be called when Object_Manager is + // being terminated. + +#if defined ACE_HAS_SIG_C_FUNC + ACE_Object_Manager::at_exit (ACE_Process_Manager::instance_, + ACE_Process_Manager_cleanup, + 0); +#else + ACE_Object_Manager::at_exit (ACE_Process_Manager::instance_, + ACE_Process_Manager::cleanup, + 0); +#endif /* ACE_HAS_SIG_C_FUNC */ + } } @@ -131,6 +160,20 @@ ACE_Process_Manager::instance (ACE_Process_Manager *tm) // We can't safely delete it since we don't know who created it! ACE_Process_Manager::delete_instance_ = 0; + // Register with the Object_Manager so that the wrapper to + // delete the proactor will be called when Object_Manager is + // being terminated. + +#if defined ACE_HAS_SIG_C_FUNC + ACE_Object_Manager::at_exit (ACE_Process_Manager::instance_, + ACE_Process_Manager_cleanup, + 0); +#else + ACE_Object_Manager::at_exit (ACE_Process_Manager::instance_, + ACE_Process_Manager::cleanup, + 0); +#endif /* ACE_HAS_SIG_C_FUNC */ + ACE_Process_Manager::instance_ = tm; return t; } |