diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-08-24 06:10:46 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-08-24 06:10:46 +0000 |
commit | 98ed902939578c1c96dbd5b6f64663cba6a48264 (patch) | |
tree | ed0d98872ff60e0cc1de270d94cdc31c7f22b0e0 | |
parent | a0052ca4c60e7a30338ab04c989fb3d4b1fae461 (diff) | |
download | ATCD-98ed902939578c1c96dbd5b6f64663cba6a48264.tar.gz |
ChangeLogTag:Tue Aug 23 22:56:33 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ace/Dev_Poll_Reactor.cpp | 20 |
2 files changed, 22 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog index 5ffbd825265..51e0583c0d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Tue Aug 23 22:56:33 2005 Ossama Othman <ossama@dre.vanderbilt.edu> + + * ace/Dev_Poll_Reactor.cpp (close): + + Removed unnecessary zeroing of underlying epoll data structure + array. + + Deallocate epoll event data structure array and /dev/poll event + handler file descriptor array after closing the epoll and + /dev/poll file descriptor to ensure consistent finalization of + resources, respectively, to prevent potential destruction of + event resources while waiting for events in another thread. + It's not clear whether such a scenario will occur since a lock + is current held but better to be consistent. + Tue Aug 23 22:35:00 2005 Ossama Othman <ossama@dre.vanderbilt.edu> * tests/Array_Map_Test.cpp (reference_count_test): diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index f1111cb99de..5d86894c644 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -966,17 +966,16 @@ ACE_Dev_Poll_Reactor::close (void) int result = 0; -#if defined (ACE_HAS_EVENT_POLL) - - if( this->events_ != 0 ) + if (this->poll_fd_ != ACE_INVALID_HANDLE) { - ACE_OS::memset (this->events_, - 0, - this->size_ * sizeof (struct epoll_event)); - delete [] this->events_; - this->events_ = 0; + result = ACE_OS::close (this->poll_fd_); } +#if defined (ACE_HAS_EVENT_POLL) + + delete [] this->events_; + this->events_ = 0; + #else delete [] this->dp_fds_; @@ -984,11 +983,6 @@ ACE_Dev_Poll_Reactor::close (void) #endif /* ACE_HAS_EVENT_POLL */ - if (this->poll_fd_ != ACE_INVALID_HANDLE) - { - result = ACE_OS::close (this->poll_fd_); - } - if (this->delete_signal_handler_) { delete this->signal_handler_; |