diff options
author | Steve Huston <shuston@riverace.com> | 2011-06-29 21:09:12 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2011-06-29 21:09:12 +0000 |
commit | eac8279bed9c901e12da3b8f5386fd1707f6100c (patch) | |
tree | 04eaa8dd116c77c42a54faef33857c37b03e91fa | |
parent | 3ec6569a5a9653bec85b2d527063899fea0c61e1 (diff) | |
download | ATCD-eac8279bed9c901e12da3b8f5386fd1707f6100c.tar.gz |
ChangeLogTag:Wed Jun 29 20:47:33 UTC 2011 Steve Huston <shuston@riverace.com>
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ace/Dev_Poll_Reactor.cpp | 5 | ||||
-rw-r--r-- | ace/Select_Reactor_T.cpp | 18 | ||||
-rw-r--r-- | ace/TP_Reactor.cpp | 5 | ||||
-rw-r--r-- | ace/WFMO_Reactor.cpp | 5 |
5 files changed, 36 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 37398d0d3e9..fb349bbd2ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Jun 29 20:47:33 UTC 2011 Steve Huston <shuston@riverace.com> + + * ace/Select_Reactor_T.cpp: + * ace/TP_Reactor.cpp: + * ace/Dev_Poll_Reactor.cpp: + * ace/WFMO_Reactor.cpp: + In handle_events(), if returning -1 because the reactor isn't + ready to handle events, also set errno to ESHUTDOWN to tell the + caller why. Fixes Bugzilla #3974. + Thu May 12 18:08:47 UTC 2011 Steve Huston <shuston@riverace.com> * include/makeinclude/wrapper_macros.GNU: Added command settings for diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index 383ab62045f..e733b84e3e1 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -1008,7 +1008,10 @@ ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value *max_wait_time) return result; if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the mutex. ACE_MT (countdown.update ()); diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp index 30666cbf11f..31d00325d52 100644 --- a/ace/Select_Reactor_T.cpp +++ b/ace/Select_Reactor_T.cpp @@ -1406,15 +1406,25 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handle_events ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1); - if (ACE_OS::thr_equal (ACE_Thread::self (), - this->owner_) == 0 || this->deactivated_) - return -1; + if (ACE_OS::thr_equal (ACE_Thread::self (), this->owner_) == 0) + { + errno = EACCES; + return -1; + } + if (this->deactivated_) + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the mutex. countdown.update (); #else if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } #endif /* ACE_MT_SAFE */ return this->handle_events_i (max_wait_time); diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp index ac9bbdada63..8dd806b2ded 100644 --- a/ace/TP_Reactor.cpp +++ b/ace/TP_Reactor.cpp @@ -165,7 +165,10 @@ ACE_TP_Reactor::handle_events (ACE_Time_Value *max_wait_time) // After getting the lock just just for deactivation.. if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the token. countdown.update (); diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp index 61c063c41d0..85fe422b0fb 100644 --- a/ace/WFMO_Reactor.cpp +++ b/ace/WFMO_Reactor.cpp @@ -1683,7 +1683,10 @@ ACE_WFMO_Reactor::event_handling (ACE_Time_Value *max_wait_time, // Make sure we are not closed if (!this->open_for_business_ || this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } // Stash the current time -- the destructor of this object will // automatically compute how much time elapsed since this method was |