Merge pull request #20452 from mostrows2/issue-19208

Issue 19208: Fix pollset_set_del_fd to cleanup all fd references.
reviewable/pr20638/r3
Lidi Zheng 5 years ago committed by GitHub
commit 7b7f38a95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/core/lib/iomgr/ev_poll_posix.cc

@ -1389,7 +1389,9 @@ static void reset_event_manager_on_fork() {
gpr_mu_lock(&fork_fd_list_mu); gpr_mu_lock(&fork_fd_list_mu);
while (fork_fd_list_head != nullptr) { while (fork_fd_list_head != nullptr) {
if (fork_fd_list_head->fd != nullptr) { if (fork_fd_list_head->fd != nullptr) {
close(fork_fd_list_head->fd->fd); if (!fork_fd_list_head->fd->closed) {
close(fork_fd_list_head->fd->fd);
}
fork_fd_list_head->fd->fd = -1; fork_fd_list_head->fd->fd = -1;
} else { } else {
close(fork_fd_list_head->cached_wakeup_fd->fd.read_fd); close(fork_fd_list_head->cached_wakeup_fd->fd.read_fd);

Loading…
Cancel
Save