代码是:
struct pollfd _conncet_client[1];
int _nfd = 1;
memset(&_conncet_client[0],0,sizeof(pollfd));
_conncet_client[0].fd = fd;
_conncet_client[0].events = POLLIN ;
int _ret;
int _loop_max = 5;
for( int i=0;i<_loop_max;i++)
{
_ret = ::poll(_conncet_client, _nfd, (int)(timeout_sec*1000));
if ( _ret < 0 && errno == EINTR )
continue;
else
break;
}
return _ret;
我只想知道将轮询返回-1并设置errno 115(EINPROGRESS)