diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2019-04-15 13:54:57 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2019-04-15 13:54:57 +0200 |
commit | 29d99306df66c97856e5a9f1d4c87fe8c8b6dba3 (patch) | |
tree | 883f6a7c179b82357b90452850f995278e5d253c | |
parent | b6ce240aff0ed2285cf6f5dc7efe454042245313 (diff) | |
download | ATCD-29d99306df66c97856e5a9f1d4c87fe8c8b6dba3.tar.gz |
In server_is_shutting_down we only get informed that the server is going down, we can't assume it is dead at that moment already
* TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp:
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp index 456dde6b655..84d684a84b8 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp @@ -465,11 +465,30 @@ AsyncAccessManager::server_is_shutting_down (void) { if (ImR_Locator_i::debug () > 4) { - this->report ("server_is_shutting_down"); + this->report ("server_is_shutting_down-start"); } + // We are informed directly by the server that it is shutting down. This doesn't + // imply that the server is dead at this point, there can be some time between + // the POA destroy and the server process exit so we have to wait for the death + // of the process before we can mark this server as dead this->prev_pid_ = this->info_->pid; - this->status (ImplementationRepository::AAM_SERVER_DEAD); - this->final_state (); + if (this->info_->death_notify) + { + // We get a death notify of the activator so we can wait on the death + // of the process + this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH); + } + else + { + // We don't get a death notify of the activator so we have to assume at + // this point the server is death + this->status (ImplementationRepository::AAM_SERVER_DEAD); + this->final_state (); + } + if (ImR_Locator_i::debug () > 4) + { + this->report ("server_is_shutting_down-end"); + } } void @@ -535,7 +554,7 @@ AsyncAccessManager::notify_child_death (int pid) if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), child death, server <%C> pid <%d> status <%C> ") + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), notify_child_death, server <%C> pid <%d> status <%C> ") ACE_TEXT ("this info_.pid <%d> prev_pid <%d> waiter count <%d>\n"), this, info_->ping_id (), pid, status_name (status_), this->info_->pid, this->prev_pid_, this->rh_list_.size())); |