diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-03 00:08:48 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-03 00:08:48 +0000 |
commit | 4effe54ffa6c2f727846c5d802ebca44c4731c17 (patch) | |
tree | 092e6e3b5dba4ef6985b8bab2c7010267e069c9a | |
parent | 4168f30dbb9bfa0fd64461daadbc311ad94457a3 (diff) | |
download | ATCD-4effe54ffa6c2f727846c5d802ebca44c4731c17.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-97b | 10 | ||||
-rw-r--r-- | ace/ACE.cpp | 18 | ||||
-rw-r--r-- | ace/Select_Reactor.i | 4 |
3 files changed, 22 insertions, 10 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b index 5577a12023d..5d890a56cce 100644 --- a/ChangeLog-97b +++ b/ChangeLog-97b @@ -1,5 +1,13 @@ Sun Nov 2 15:31:45 1997 Douglas C. Schmidt <schmidt@polka.cs.wustl.edu> + * ace/Select_Reactor.i (cancel_timer): Make sure that we don't try + to call cancel() through a NULL this->timer_queue_. Thanks to + Stephen Coy <stevec@wsa.com.au> for reporting this. + + * ace/ACE.cpp (set_handle_limit): Fixed a subtle bug that occurs + if the OS doesn't like non-initialized rlimit structs. Thanks + to Stephen Coy <stevec@wsa.com.au> for reporting this. + * examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp (main): Renamed allocator to my_alloc to work around wonderful STL and GCC problems... Thanks to Ben Eng <ben@jetpen.com> for @@ -97,7 +105,7 @@ Fri Oct 31 14:35:37 1997 David L. Levine <levine@cs.wustl.edu> Fri Oct 31 00:53:52 1997 <irfan@TWOSTEP> * The following five changes were suggested by Stephen Coy - <stevec@wsa.com.au>. Thanks Stephen. + <stevec@wsa.com.au>. Thanks Stephen. * ace/OS.h (ACE_CLASS_IS_NAMESPACE): Changed friend ace_dewarn_gplusplus to friend class ace_dewarn_gplusplus. diff --git a/ace/ACE.cpp b/ace/ACE.cpp index acd6a1d0163..ec72b13182b 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -1491,15 +1491,19 @@ ACE::set_handle_limit (int new_limit) ACE_TRACE ("ACE::set_handle_limit"); #if defined (RLIMIT_NOFILE) struct rlimit rl; + + if (ACE_OS::getrlimit (RLIMIT_NOFILE, &rl) != -1) + { + int max_handles = rl.rlim_cur; - int max_handles = ACE::max_handles (); - - if (new_limit < 0 || new_limit > max_handles) - rl.rlim_cur = max_handles; + if (new_limit < 0 || new_limit > max_handles) + rl.rlim_cur = max_handles; + else + rl.rlim_cur = new_limit; + return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); + } else - rl.rlim_cur = new_limit; - - return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); + return -1; #else new_limit = new_limit; ACE_NOTSUP_RETURN (-1); diff --git a/ace/Select_Reactor.i b/ace/Select_Reactor.i index 91e318cc85a..03def73b115 100644 --- a/ace/Select_Reactor.i +++ b/ace/Select_Reactor.i @@ -123,8 +123,8 @@ ACE_Select_Reactor::cancel_timer (ACE_Event_Handler *handler, int dont_call_handle_close) { ACE_TRACE ("ACE_Select_Reactor::cancel_timer"); - return this->timer_queue_->cancel (handler, - dont_call_handle_close); + return this->timer_queue_ != 0 && + this->timer_queue_->cancel (handler, dont_call_handle_close); } ACE_INLINE int |