diff options
author | Steve Huston <shuston@riverace.com> | 2011-06-29 21:14:35 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2011-06-29 21:14:35 +0000 |
commit | 2e25da3979d138a736c3ad95e3435c709f5e43b4 (patch) | |
tree | d7940d8799f876c0a085c763d843454c20fee407 | |
parent | 3f9715a36fcc635e0b85233f065b1707dbdf4749 (diff) | |
download | ATCD-2e25da3979d138a736c3ad95e3435c709f5e43b4.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 5b876c56c00..97c50d2b775 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 feb9ff4ae3f..7faf5840504 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -1011,7 +1011,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 |