linux select 超时设置15秒,为什么返回0
1个回答
展开全部
RETURN VALUE
On success, select() and pselect() return the number of file descriptors contained in the three
returned descriptor sets (that is, the total number of bits that are set in readfds, writefds,
exceptfds) which may be zero if the timeout expires before anything interesting happens. On
error, -1 is returned, and errno is set appropriately; the sets and timeout become undefined, so
do not rely on their contents after an error.
超时就是返回0的 成功返回触发条件的文件描述符个数 错误返回-1
On success, select() and pselect() return the number of file descriptors contained in the three
returned descriptor sets (that is, the total number of bits that are set in readfds, writefds,
exceptfds) which may be zero if the timeout expires before anything interesting happens. On
error, -1 is returned, and errno is set appropriately; the sets and timeout become undefined, so
do not rely on their contents after an error.
超时就是返回0的 成功返回触发条件的文件描述符个数 错误返回-1
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询