summaryrefslogtreecommitdiff
path: root/ace/Process_Manager.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-10-13 05:00:32 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-10-13 05:00:32 +0000
commita8bf4fee150e0fec4bfe1fa56ca2d4bfe2a1cd8d (patch)
treeb26c3f2be9d0144357f02d577f85c6e2a0066deb /ace/Process_Manager.cpp
parent065aa94de5c0e345502677e0b7b2f99bab82c6bc (diff)
downloadATCD-a8bf4fee150e0fec4bfe1fa56ca2d4bfe2a1cd8d.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Process_Manager.cpp')
-rw-r--r--ace/Process_Manager.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp
index 164dccbbdf6..be9585a12f5 100644
--- a/ace/Process_Manager.cpp
+++ b/ace/Process_Manager.cpp
@@ -729,6 +729,8 @@ ACE_Process_Manager::wait (pid_t pid,
if (status == 0)
status = &local_stat;
+ *status = 0;
+
ssize_t idx = -1;
ACE_Process *proc = 0;
@@ -855,17 +857,22 @@ ACE_Process_Manager::wait (pid_t pid,
{
idx = this->find_proc (pid);
if (idx == -1)
- // oops, reaped an unmanaged process!
- ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%P|%t) oops, reaped unmanaged %d\n"),
- pid));
- else
{
- this->notify_proc_handler (idx,
- *status);
- this->remove_proc (idx);
+ // oops, reaped an unmanaged process!
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%P|%t) oops, reaped unmanaged %d\n"),
+ pid));
+ return pid;
}
+ else
+ proc = process_table_[idx].process_;
}
+ else
+ ACE_ASSERT (pid == proc->getpid ());
+
+ this->notify_proc_handler (idx,
+ *status);
+ this->remove_proc (idx);
}
return pid;