diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-23 20:46:54 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-23 20:46:54 +0000 |
commit | 17ade1d5c11a2c748bbc5a26f962d7ac42e71719 (patch) | |
tree | 965651ef0de533b5b4b824f1467597d441f6d477 /ace/Select_Reactor.cpp | |
parent | 4e8b06215d6065b35bea417a1888612f038ba9fe (diff) | |
download | ATCD-17ade1d5c11a2c748bbc5a26f962d7ac42e71719.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Select_Reactor.cpp')
-rw-r--r-- | ace/Select_Reactor.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ace/Select_Reactor.cpp b/ace/Select_Reactor.cpp index c74f7a4e077..1292916eef4 100644 --- a/ace/Select_Reactor.cpp +++ b/ace/Select_Reactor.cpp @@ -105,11 +105,20 @@ ACE_Select_Reactor_Handler_Repository::open (size_t size) ACE_SELECT_REACTOR_EVENT_HANDLER (this, h) = 0; #endif /* ACE_WIN32 */ + // Check to see if the user is asking for too much and fail in this + // case. + if (size > FD_SETSIZE) + { + errno = ERANGE; + return -1; + } +#if defined (RLIMIT_NOFILE) // Increase the number of handles if <size> is greater than the // current limit. - if (size > ACE::max_handles ()) + if (size < ACE::max_handles ()) return ACE::set_handle_limit (size); else +#endif /* RLIMIT_NOFILE */ return 0; } |