diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index b0c9f004c..532a8938f 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -715,14 +715,13 @@ io_loop(void *data) { fprintf(stderr, "The child %lu had its fd unexpectedly closed\n", children[i].id); } } - if (false) { - for (i = 0; i < self->count + EXTRA_FDS; i++) { +#ifdef DEBUG_POLL_EVENTS + for (i = 0; i < self->count + EXTRA_FDS; i++) { #define P(w) if (fds[i].revents & w) printf("i:%lu %s\n", i, #w); - P(POLLIN); P(POLLPRI); P(POLLOUT); P(POLLERR); P(POLLHUP); P(POLLNVAL); + P(POLLIN); P(POLLPRI); P(POLLOUT); P(POLLERR); P(POLLHUP); P(POLLNVAL); #undef P - - } } +#endif } else if (ret < 0) { if (errno != EAGAIN && errno != EINTR) { perror("Call to poll() failed");