]> Sergey Matveev's repositories - public-inbox.git/commit
DS: epoll: fix misordered EPOLL_CTL_DEL call
authorEric Wong <e@80x24.org>
Wed, 8 May 2019 19:04:17 +0000 (19:04 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 May 2019 19:04:17 +0000 (19:04 +0000)
commit90c5a78c8f6239b27c32b816d1cd029196ba2fe2
treec847d11f24951e10714fae649739805a5bd3c22a
parentb6759f4bb35d7eda60044c6f8784274ebd61d729
DS: epoll: fix misordered EPOLL_CTL_DEL call

Any operations on an fd after POSIX::close() are invalid, so
epoll_ctl will fail.  Worse off, in a multi-threaded Perl, the
fd may be reused by another thread and EPOLL_CTL_DEL can hit the
wrong file description as a result.

cf. https://rt.cpan.org/Ticket/Display.html?id=129487
lib/PublicInbox/DS.pm