diff options
Diffstat (limited to 'ace/Thread_Manager.cpp')
-rw-r--r-- | ace/Thread_Manager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp index 4d2571b4c62..1809f9c847f 100644 --- a/ace/Thread_Manager.cpp +++ b/ace/Thread_Manager.cpp @@ -966,6 +966,11 @@ ACE_Thread_Manager::kill_thr (ACE_Thread_Descriptor *td, int signum) ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); \ ACE_ASSERT (this->thr_to_be_removed_.is_empty ()); \ ACE_FIND (this->find_thread (t_id), ptr); \ + if (ptr == 0) \ + { \ + errno = ENOENT; \ + return -1; \ + } \ int result = OP (ptr); \ int error = errno; \ while (! this->thr_to_be_removed_.is_empty ()) { \ @@ -1013,6 +1018,12 @@ ACE_Thread_Manager::kill (ACE_thread_t t_id, int signum) ACE_ASSERT (this->thr_to_be_removed_.is_empty ()); ACE_FIND (this->find_thread (t_id), ptr); + if (ptr == 0) + { + errno = ENOENT; + return -1 ; + } + int result = this->kill_thr (ptr, signum); int error = errno; while (! this->thr_to_be_removed_.is_empty ()) { |