Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我在添加要监视的描述符时同时指定EPOLLIN和标志。从“epoll”联机帮助页中,不清楚作为数组的一部分返回的每个结构在其字段中究竟携带什么。报价:EPOLLOUTepoll_waitepoll_eventevents
EPOLLIN
EPOLLOUT
epoll_wait
epoll_event
events
events 成员将包含返回的事件位字段。
这是否意味着无法区分是否触发了表示“可以写”而不是“可以读”的事件?基本上有一个事件掩码,从逻辑上讲,我希望返回的数组能够准确地表示文件描述符上“发生”了哪些事件?
你的期望是对的。该events成员将包含该文件描述符发生的事件。