kovidgoyal/kitty · warning
Call to read() from read_signals() failed with error: %s
Error message
Call to read() from read_signals() failed with error: %s
What it means
The signalfd read in read_signals failed with an error other than EINTR/EAGAIN, so the signal-processing pass stops for this iteration; signals may be processed on a later loop iteration.
Source
Thrown at kitty/loop-utils.c:149
if (errno == EINTR) continue;
if (!in_signal_handler) log_error("Failed to write to %s wakeup fd with error: %s", loop_name, strerror(errno));
}
break;
}
}
void
read_signals(int fd, handle_signal_func callback, void *data) {
#ifdef HAS_SIGNAL_FD
static struct signalfd_siginfo fdsi[32];
siginfo_t si;
while (true) {
ssize_t s = read(fd, &fdsi, sizeof(fdsi));
if (s < 0) {
if (errno == EINTR) continue;
if (errno == EAGAIN) break;
log_error("Call to read() from read_signals() failed with error: %s", strerror(errno));
break;
}
if (s == 0) break;
size_t num_signals = s / sizeof(struct signalfd_siginfo);
if (num_signals == 0 || num_signals * sizeof(struct signalfd_siginfo) != (size_t)s) {
log_error("Incomplete signal read from signalfd");
break;
}
for (size_t i = 0; i < num_signals; i++) {
si.si_signo = fdsi[i].ssi_signo;
si.si_code = fdsi[i].ssi_code;
si.si_pid = fdsi[i].ssi_pid;
si.si_uid = fdsi[i].ssi_uid;
si.si_addr = (void *)(uintptr_t)fdsi[i].ssi_addr;
si.si_status = fdsi[i].ssi_status;
si.si_value.sival_int = fdsi[i].ssi_int;
if (!callback(&si, data)) break;
}View on GitHub (pinned to 6d5d0c4406)
Solutions
- Ignore if it appears only at exit
- Upgrade kitty
- Report upstream with a reproduction if it happens during normal operation
Defensive patterns
Strategy: retry
Prevention
- Ignore at shutdown; report persistent occurrences upstream
When it happens
Trigger: read() on the signalfd fd failing with EBADF/EINVAL etc. - typically the fd was closed concurrently during shutdown.
Common situations: Benign shutdown races between the io loop thread and the main thread on Linux.
Related errors
- Incomplete signal read from signalfd
- This must be run as kitten choose-files
- Pipe to kitten was broken while sending data to it
- Failed to find cwd of process with pid: {pid}
- Failed to write to %s wakeup fd with error: %s
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/a7187fef9db35cb4.
Report an issue: GitHub.