关于epoll返回值的问题

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

1个回答

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.,,,请认真阅读

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问