summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-07-31 23:30:26 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-07-31 23:30:26 +0000
commit4f74cbfae055973889f1454461738e539980e586 (patch)
tree7b9779ec6051693a79a1ffb754617a1d33e3ed08
parent551a94446aa93c7c20d4f9da9bb94f78405103be (diff)
downloadATCD-4f74cbfae055973889f1454461738e539980e586.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98a12
-rw-r--r--ace/ACE.cpp7
2 files changed, 10 insertions, 9 deletions
diff --git a/ChangeLog-98a b/ChangeLog-98a
index 8d598a29741..c5daa4d7ee1 100644
--- a/ChangeLog-98a
+++ b/ChangeLog-98a
@@ -2790,12 +2790,12 @@ Sat Feb 14 18:28:19 1998 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
Sat Feb 14 03:29:50 1998 Sergio Flores <sergio@tango.cs.wustl.edu>
- * ace/ACE.cpp (set_handle_limit): Fixed a couple of bugs setting
- the maximum number of file descriptors. If we use setrlimit, we
- should first get the hard limit before calling it, or we get an
- EINVAL for trying to set a hard limit of 0 and a soft limit
- greater than that. Also, for -1 the call was not setting the
- limit to the maximum allowable.
+ * ace/ACE.cpp (set_handle_limit): Fixed a couple of bugs
+ setting the maximum number of file descriptors. If we use
+ setrlimit, we should first get the hard limit before calling
+ it, or we get an EINVAL for trying to set a hard limit of 0
+ and a soft limit greater than that. Also, for -1 the call
+ was not setting the limit to the maximum allowable.
* ace/OS.h (ACE_MAX_DGRAM_SIZE): Moved the #define
ACE_MAX_DGRAM_SIZE from the PSOS specific part of OS.h.
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 42d6ee6f0f8..00a73fbf383 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -1788,6 +1788,7 @@ ACE::set_handle_limit (int new_limit)
#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
struct rlimit rl;
+
ACE_OS::memset ((void *) &rl, 0, sizeof rl);
ACE_OS::getrlimit (RLIMIT_NOFILE, &rl);
max_limit = rl.rlim_max;
@@ -1801,13 +1802,13 @@ ACE::set_handle_limit (int new_limit)
errno = EINVAL;
return -1;
}
- if (new_limit > cur_limit)
+ else if (new_limit > cur_limit)
{
#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
rl.rlim_cur = new_limit;
return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl);
#else
- // Must be return EINVAL errno.
+ // Must return EINVAL errno.
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_LACKS_RLIMIT */
}
@@ -1817,7 +1818,7 @@ ACE::set_handle_limit (int new_limit)
rl.rlim_cur = new_limit;
return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl);
#else
- // We give a chance to platforms with not RLIMIT to work.
+ // We give a chance to platforms without RLIMIT to work.
ACE_NOTSUP_RETURN (0);
#endif /* ACE_LACKS_RLIMIT */
}