struct epoll_event ev, events[20];
ev.events = EPOLLOUT | EPOLLONESHOT;
ev.data.sock = some_socket;
epoll_ctl(epfd, EPOLL_CTL_ADD, some_socket, &ev);
// then the EPOLLOUT event has triggered by epoll_wait
epoll_ctl(epfd, EPOLL_CTL_DEL, some_socket, NULL); // should it be called? will it cause error?
after the EPOLLOUT event has been triggered, the MAN page said the event has now been disabled and will not triggered. I don't know if it's completely same as EPOLL_CTL_DEL. Do I need to manually call EPOLL_CTL_DEL when closing the socket if EPOLLOUT | EPOLLONESHOT is the only event that has been triggered?