diff options
author | Steve Huston <shuston@riverace.com> | 2000-05-25 22:43:21 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2000-05-25 22:43:21 +0000 |
commit | 8fc2edcee6cc131a92c327f91142f3a83590d7df (patch) | |
tree | 84272e3597e97a1e1b26cd1dd21647b3a9f0fdfd | |
parent | dd0b0eaf4a26e9edce6e9fd4be7301d3858a8e6b (diff) | |
download | ATCD-8fc2edcee6cc131a92c327f91142f3a83590d7df.tar.gz |
ChangeLogTag:Thu May 25 18:21:41 2000 Steve Huston <shuston@riverace.com>
-rw-r--r-- | ace/ACE.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 8fe5573f325..cdaeaf3ac22 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -3278,22 +3278,22 @@ ACE::max_handles (void) #if defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT) rlimit rl; ACE_OS::getrlimit (RLIMIT_NOFILE, &rl); -# if defined (RLIM_INFINITY) +# if !defined (RLIM_INFINITY) + return rl.rlim_cur; +#else if (rl.rlim_cur != RLIM_INFINITY) return rl.rlim_cur; -#else - return rl.rlim_cur; + // If == RLIM_INFINITY, fall through to the ACE_LACKS_RLIMIT sections # endif /* RLIM_INFINITY */ -# if defined (_SC_OPEN_MAX) +#endif /* RLIMIT_NOFILE && !ACE_LACKS_RLIMIT */ + +#if defined (_SC_OPEN_MAX) return ACE_OS::sysconf (_SC_OPEN_MAX); -# elif defined (FD_SETSIZE) +#elif defined (FD_SETSIZE) return FD_SETSIZE; -# else - ACE_NOTSUP_RETURN (-1); -# endif /* _SC_OPEN_MAX */ #else ACE_NOTSUP_RETURN (-1); -#endif /* defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT) */ +#endif /* _SC_OPEN_MAX */ } // Set the number of currently open handles in the process. |