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:
@@ -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)))))
|
||||
|
||||
@@ -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)))))
|
||||
|
||||
Reference in New Issue
Block a user