fix: remove :input :interactive from stty size subprocess

:input :interactive causes uiop to block on /dev/tty in the parent.
stty size queries terminal via ioctl, not stdin — no input
redirection needed.
This commit is contained in:
2026-05-14 14:30:17 -04:00
parent ce7af16b13
commit 733ba7c1b8
2 changed files with 2 additions and 4 deletions

View File

@@ -163,13 +163,12 @@ as a fallback when a keyword is not in *named-colors*.")
(defmethod backend-size ((b modern-backend))
(or ;; stty size via subprocess — most reliable across all systems.
;; Returns "ROWS COLS". Uses :input :interactive so the subprocess
;; opens /dev/tty for its stdin (SBCL's stdin is the load file).
;; Returns "ROWS COLS". stty size queries the terminal via ioctl,
;; not stdin, so no :input redirection is needed.
(multiple-value-bind (cols rows)
(ignore-errors
(let* ((out (uiop:run-program '("stty" "size")
:output :string
:input :interactive
:ignore-error-status t))
(parts (and out (uiop:split-string
(string-trim '(#\newline #\space) out)))))

View File

@@ -27,7 +27,6 @@
(ignore-errors
(let* ((out (uiop:run-program '("stty" "size")
:output :string
:input :interactive
:ignore-error-status t))
(parts (and out (uiop:split-string
(string-trim '(#\newline #\space) out)))))