epoll del bad file descriptor

1. 先删除事件   epoll_ctl(kdpfd, EPOLL_CTL_DEL, fd, NULL);

2. 后close(fd)

3. 否则会出现bad file descriptor的错误

posted @ 2022-02-16 11:47  海228  阅读(114)  评论(0)    收藏  举报