[omniORB] in case of POLLERR

Duncan Grisby duncan at grisby.org
Mon Dec 29 15:12:45 GMT 2008


On Thursday 27 November, Masaaki Sekiya wrote:

> I can't get any comments before. so now I've posted again.
> 
> orbcore/tcp/tcpAddress.cc :L261-264  is as below.
> 
>     int rc = poll(&fds,1,timeout);
>     if (rc > 0 && fds.revents & POLLERR) {
>       rc = 0;
>     }
>     
> Why is "rc" set to 0 , when poll results in POLLERR ?
> The value of "rc" equals zero means poll resulted in timeouts.
> I think setting "rc" to zero without timeouts causes 
> many loop without system idle and huge CPU consumption.
> Is it no problem ?

Sorry for the long delay. Yes, it is a bug, which only occurs on
platforms where recv() cannot be interrupted by closing the socket.
I've fixed it in CVS by changing the code to set rc = RC_SOCKET_ERROR
rather than 0.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list