Skip to content

Commit

Permalink
lib: Panic on most epoll_ctl() failures
Browse files Browse the repository at this point in the history
Anything except ENOSPC or ENOMEM points to a bug in code. Getting core dump
from those helps debugging.
  • Loading branch information
sirainen committed Mar 8, 2019
1 parent 062ed1d commit 211e7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/ioloop-epoll.c
Expand Up @@ -145,7 +145,7 @@ void io_loop_handle_remove(struct io_file *io, bool closed)
const char *errstr = t_strdup_printf(
"epoll_ctl(%s, %d) failed: %m",
op == EPOLL_CTL_DEL ? "del" : "mod", io->fd);
if (errno == EBADF)
if (errno != ENOSPC && errno != ENOMEM)
i_panic("%s", errstr);
else
i_error("%s", errstr);
Expand Down

0 comments on commit 211e7bc

Please sign in to comment.