diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2011-05-05 22:03:32 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2011-05-05 22:03:32 +0000 |
commit | 99914ff658e0cbd8e2ec3a0bed0046506f3a136c (patch) | |
tree | dde8c05e6b38d037b2c67062187c446440251a80 /ACE/ace/Select_Reactor_T.cpp | |
parent | fd1648522f3df99e3e60243de2366cb075452273 (diff) | |
download | ATCD-99914ff658e0cbd8e2ec3a0bed0046506f3a136c.tar.gz |
Thu May 5 21:38:45 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com>
* ace/Select_Reactor_T.cpp:
Added a reset of errno during the ctor in case there was an
error during the first attempt at opening the reactor. Turns out
that in this case on at least on Linux, the errno leaks through
the second, good call to open. This can happen for example, when
ACE::max_handles() is less than the select reactor's DEFAULT_SIZE.
Since all this happens in a ctor, there's no result value for
application code to check, apart from errno.
Diffstat (limited to 'ACE/ace/Select_Reactor_T.cpp')
-rw-r--r-- | ACE/ace/Select_Reactor_T.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ACE/ace/Select_Reactor_T.cpp b/ACE/ace/Select_Reactor_T.cpp index 2b972a8b6b8..2314132cafc 100644 --- a/ACE/ace/Select_Reactor_T.cpp +++ b/ACE/ace/Select_Reactor_T.cpp @@ -495,6 +495,9 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ACE_Select_Reactor_T // determine the size at run-time by checking the process file // descriptor limit on platforms that support this feature. + // reset the errno so that subsequent checks are valid + errno = 0; + // There is no need to deallocate resources from previous open() // call since the open() method deallocates any resources prior // to exiting if an error was encountered. |