Indicates that "epoll_wait" means which event was triggered when both EPOLLIN and EPOLLOUT were added?

Suppose that I am pointing the flags EPOLLINand EPOLLOUTby adding monitoring descriptors using epoll_wait. From the "epoll" man pages it is not clear what exactly each of the structures epoll_eventreturned as part of the array carries to the field events. Citation:

the event member will contain the bit field of the returned event.

Does this mean that it is impossible to distinguish whether an event meaning "can-write" was triggered and not "can-read"? Basically there is an event mask, and I logically expect that the returned array will mean which events (events) "occurred" in the file descriptor?

+3
source share
1 answer

Your expectations are true. The element eventswill contain the events (events) that occurred for this file descriptor.

+4
source

Source: https://habr.com/ru/post/1788194/


All Articles