fireyyouth
fireyyouth
采纳率0%
2016-08-26 09:50 阅读 2.2k

关于epoll返回值的问题

epoll_wait返回值是就绪描述符的数量n,那么下来应该遍历0~maxevents选出这n个描述符,而我看例子代码中是直接遍历0~n的。请指教

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • u012730169 tomsun123 2016-08-26 11:46

    Return Value

    When successful, epoll_wait() returns the number of file descriptors ready for the requested I/O, or zero if no file descriptor became ready during the requested timeout milliseconds. When an error occurs, epoll_wait() returns -1 and errno is set appropriately.,,,请认真阅读

    点赞 评论 复制链接分享

相关推荐