From 733ba7c1b8531f910a5b5f8e639bdb241031684c Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Thu, 14 May 2026 14:30:17 -0400 Subject: [PATCH] fix: remove :input :interactive from stty size subprocess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :input :interactive causes uiop to block on /dev/tty in the parent. stty size queries terminal via ioctl, not stdin — no input redirection needed. --- src/backend/modern.lisp | 5 ++--- src/backend/simple.lisp | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend/modern.lisp b/src/backend/modern.lisp index cd633f2..fa9fe2c 100644 --- a/src/backend/modern.lisp +++ b/src/backend/modern.lisp @@ -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))))) diff --git a/src/backend/simple.lisp b/src/backend/simple.lisp index d0a64a6..7ce8a55 100644 --- a/src/backend/simple.lisp +++ b/src/backend/simple.lisp @@ -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)))))