C linux轮询是否会返回-1并设置错误号115?

C linux轮询是否会返回-1并设置错误号115?,c,linux,C,Linux,代码是: 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

代码是:

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;
struct pollfd_concet_client[1];
int _nfd=1;
memset(&_concet_client[0],0,sizeof(pollfd));
_连接客户端[0]。fd=fd;
_conncet_客户端[0]。事件=POLLIN;
国际检索;
int _loop_max=5;

for(int i=0;i根据
poll
函数返回时不会出现
EINPROGRESS
错误。也许您可以详细说明您遇到的实际问题?并请花一些时间来学习如何创建。去掉伪下划线。它们在许多上下文中都是保留的,不能免费使用。(你从Python中下载的货物?)你也标记了这个C,但是它看起来像C++……从@ Apple程序员引用的手册页面中看到:“一个0的值表示调用超时,没有文件描述符准备好。”我可以假定这就是你所追求的吗?