Welcome! Log In Create A New Profile


Why does ngx_epoll_del_event use EPOLL_CTL_MOD

Qiying Wang
October 28, 2019 03:52AM
Sorry for bothering you.

I think I've made it clear.

Because there's another function ngx_epoll_add_connection which add an
event combined with EPOLLIN & EPOLLOUT. If using ngx_epoll_del_event on
this kind of event it cannot just use EPOLL_CTL_DEL, in which way both the
read and write will be delete. That's why the EPOLL_CTL_MOD was used here.

There's another piece of code in the ignored parts of the code I previously
quoted. Which means when deleting a read event, set it to write event and
modify it, while when deleting a write event, set it to read event and
modify it.

if (event == NGX_READ_EVENT) {
e = c->write;
prev = EPOLLOUT;

} else {
e = c->read;
nginx-devel mailing list
Subject Author Views Posted

Why does ngx_epoll_del_event use EPOLL_CTL_MOD

Qiying Wang 104 October 28, 2019 03:52AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready