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))
|
(defmethod backend-size ((b modern-backend))
|
||||||
(or ;; stty size via subprocess — most reliable across all systems.
|
(or ;; stty size via subprocess — most reliable across all systems.
|
||||||
;; Returns "ROWS COLS". Uses :input :interactive so the subprocess
|
;; Returns "ROWS COLS". stty size queries the terminal via ioctl,
|
||||||
;; opens /dev/tty for its stdin (SBCL's stdin is the load file).
|
;; not stdin, so no :input redirection is needed.
|
||||||
(multiple-value-bind (cols rows)
|
(multiple-value-bind (cols rows)
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(let* ((out (uiop:run-program '("stty" "size")
|
(let* ((out (uiop:run-program '("stty" "size")
|
||||||
:output :string
|
:output :string
|
||||||
:input :interactive
|
|
||||||
:ignore-error-status t))
|
:ignore-error-status t))
|
||||||
(parts (and out (uiop:split-string
|
(parts (and out (uiop:split-string
|
||||||
(string-trim '(#\newline #\space) out)))))
|
(string-trim '(#\newline #\space) out)))))
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
(ignore-errors
|
(ignore-errors
|
||||||
(let* ((out (uiop:run-program '("stty" "size")
|
(let* ((out (uiop:run-program '("stty" "size")
|
||||||
:output :string
|
:output :string
|
||||||
:input :interactive
|
|
||||||
:ignore-error-status t))
|
:ignore-error-status t))
|
||||||
(parts (and out (uiop:split-string
|
(parts (and out (uiop:split-string
|
||||||
(string-trim '(#\newline #\space) out)))))
|
(string-trim '(#\newline #\space) out)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user