diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-08-27 23:55:56 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-08-27 23:55:56 +0000 |
commit | 5ca570d684c25d68755b46155680d69e596095ef (patch) | |
tree | cb6f8c2af67b1108c0196f722fc2531dc8a8a32c | |
parent | e0519ce4faa6102550e43c2c1951c12aadcf46e1 (diff) | |
download | ATCD-5ca570d684c25d68755b46155680d69e596095ef.tar.gz |
ChangeLogTag: Tue Aug 27 18:52:59 2002 Balachandran Natarajan <bala@isis-server.vuse.vanderbilt.edu>
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 15 | ||||
-rw-r--r-- | ace/Select_Reactor_T.cpp | 19 |
3 files changed, 48 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 051cb195524..a213668b12b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Tue Aug 27 18:52:59 2002 Balachandran Natarajan <bala@isis-server.vuse.vanderbilt.edu> + + * ace/Select_Reactor_T.cpp (wait_for_multiple_events): Normally, + select() will reset the bits in dispatch_set so that only those + filed descriptors that are ready will have bits set. However, + when an error occurs, the bit set remains as it was when the + select call was first made. Thus, we now have a dispatch_set + that has every file descriptor that was originally waited for, + which is not correct. We must clear all the bit sets because we + have no idea if any of the file descriptors is ready. + + Thanks to Jody Hagins <jody@atdesk.com> and Carlos O'Ryan + <coryan@atdesk.com> for reporting this problem and proving the + patches. + Tue Aug 27 15:56:10 2002 Ossama Othman <ossama@uci.edu> * ace/config-sunos5.8-sunc++-5.4.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 051cb195524..a213668b12b 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,18 @@ +Tue Aug 27 18:52:59 2002 Balachandran Natarajan <bala@isis-server.vuse.vanderbilt.edu> + + * ace/Select_Reactor_T.cpp (wait_for_multiple_events): Normally, + select() will reset the bits in dispatch_set so that only those + filed descriptors that are ready will have bits set. However, + when an error occurs, the bit set remains as it was when the + select call was first made. Thus, we now have a dispatch_set + that has every file descriptor that was originally waited for, + which is not correct. We must clear all the bit sets because we + have no idea if any of the file descriptors is ready. + + Thanks to Jody Hagins <jody@atdesk.com> and Carlos O'Ryan + <coryan@atdesk.com> for reporting this problem and proving the + patches. + Tue Aug 27 15:56:10 2002 Ossama Othman <ossama@uci.edu> * ace/config-sunos5.8-sunc++-5.4.h: diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp index 9a45c4183ff..57c47cb55fa 100644 --- a/ace/Select_Reactor_T.cpp +++ b/ace/Select_Reactor_T.cpp @@ -996,7 +996,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler_i } template <class ACE_SELECT_REACTOR_TOKEN> int -ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending +ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending (const ACE_Time_Value &max_wait_time) { ACE_TRACE ("ACE_Select_Reactor_T::work_pending"); @@ -1079,6 +1079,23 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::wait_for_multiple_events dispatch_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); #endif /* ACE_WIN32 */ } + elseif (number_of_active_handles == -1) + { + // Normally, select() will reset the bits in dispatch_set + // so that only those filed descriptors that are ready will + // have bits set. However, when an error occurs, the bit + // set remains as it was when the select call was first made. + // Thus, we now have a dispatch_set that has every file + // descriptor that was originally waited for, which is not + // correct. We must clear all the bit sets because we + // have no idea if any of the file descriptors is ready. + // + // NOTE: We dont have a test case to reproduce this + // problem. But pleae dont ignore this and remove it off. + dispatch_set.rd_mask_.reset (); + dispatch_set.wr_mask_.reset (); + dispatch_set.ex_mask_.reset (); + } } // Return the number of events to dispatch. |