On Tuesday, 17 May 2022 09:44:07 CEST Marek Lindner wrote: [...] > Thanks for preparing the rebase & code change patches. Wouldn't you say that > EPOLL_CTL_DEL somewhere near unix_sock_event_listener_free() could be helpful? > > Something like: > -static void unix_sock_event_listener_free(struct event_listener *listener) > +static void unix_sock_event_listener_free(struct globals *globals, > + struct event_listener *listener) > { > list_del(&listener->list); > + epoll_ctl(globals->epollfd, EPOLL_CTL_DEL, listener->fd, NULL); > close(listener->fd); > free(listener); > } No, alfred doesn't share file descriptors and thus close of the fd will do this for us [1]. Kind regards, Sven [1] https://man7.org/linux/man-pages/man7/epoll.7.html "Will closing a file descriptor cause it to be removed from all epoll interest lists?"