diff --git a/src/components/controller.cpp b/src/components/controller.cpp index cd3fc334..2f93c969 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -275,7 +275,20 @@ void controller::read_events() { int events = select(maxfd + 1, &readfds, nullptr, nullptr, nullptr); // Check for errors - if (events == -1 || g_terminate || m_connection.connection_has_error()) { + if (events == -1) { + + /* + * The Interrupt errno is generated when polybar is stopped, so it + * shouldn't generate an error message + */ + if (errno != EINTR) { + m_log.err("select failed in event loop: %s", strerror(errno)); + } + + break; + } + + if (g_terminate || m_connection.connection_has_error()) { break; }