Did anyone play with command_fifo? It seems… fragile, if not utterly broken. I can update a buffer via the command fifo only with liberal use of sleep, not sending eval -draft to kak, not relying on response_fifo (reading from it can result in an interrupted system call; then, if the shell process retries, a hang).
The only reproducible thing I have right now is
nop -- %sh{
set -ue
i=9000
while :; do
i=$(( i - 1 ))
[ $i -ge 0 ] || break
#echo 1>&2 $i
echo >"$kak_command_fifo" 'echo -debug hi'
done
}
which, after being sourced a couple of times, eventually leads to a SEGFAULT. With valgrind, I can trace it back to event_manager.cc:143
if (it != m_fd_watchers.end())
(*it)->run(events, mode);
All this with the 2021.10 release, g++9, g++10 and clang++12
I suppose there is bugwork to be done, but I’m curious if anyone has played with this… interesting feature.