diff --git a/org/channel-tui-main.org b/org/channel-tui-main.org index 78283a0..56f30b9 100644 --- a/org/channel-tui-main.org +++ b/org/channel-tui-main.org @@ -910,8 +910,13 @@ Event handlers + daemon I/O + main loop. ;; breaks read on fd 0 in this SBCL environment, but -echo alone ;; works. A cat subprocess inherits the terminal and provides ;; bytes through a pipe that SBCL reads reliably. - ;; A cat subprocess reads keyboard input from the terminal. - (let* ((cat-proc (uiop:launch-program '("stdbuf" "-o0" "cat") + ;; Enable character-at-a-time input (-icanon) so Ctrl+P/B + ;; arrive as individual bytes instead of being buffered. + ;; SBCL now reads from cat's pipe, not directly from fd 0, + ;; so -icanon doesn't trigger the SBCL read block issue. + (uiop:run-program '("stty" "-icanon" "-echo") + :output nil :ignore-error-status t) + (let* ((cat-proc (uiop:launch-program '("cat") :output :stream :input :interactive :stderr nil))