fix: run stty size via 'sh -c' with /dev/tty redirection

uiop:run-program may redirect the child's stdin, preventing stty
from querying the terminal. 'stty size < /dev/tty' explicitly
reads from the controlling terminal regardless of stdin setup.
This commit is contained in:
2026-05-14 14:20:22 -04:00
parent 4df3048a13
commit fe301dc25b
2 changed files with 5 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
(sb-alien:free-alien winsize))))
;; stty size via subprocess — reliable on every Unix.
(ignore-errors
(let* ((out (uiop:run-program '("stty" "size")
(let* ((out (uiop:run-program '("sh" "-c" "stty size < /dev/tty")
:output :string
:ignore-error-status t))
(parts (and out (uiop:split-string