fix: use raw O_RDWR=2 constant (sb-unix:o-rdwr doesn't exist)

This commit is contained in:
2026-05-14 13:57:03 -04:00
parent 37f83db35e
commit a227a52c48
2 changed files with 2 additions and 2 deletions

View File

@@ -176,7 +176,7 @@ as a fallback when a keyword is not in *named-colors*.")
;; Direct ioctl on /dev/tty — opens the real controlling terminal, ;; Direct ioctl on /dev/tty — opens the real controlling terminal,
;; bypassing any fd weirdness from SBCL's subprocess or stream setup. ;; bypassing any fd weirdness from SBCL's subprocess or stream setup.
(ignore-errors (ignore-errors
(let ((tty-fd (sb-unix:unix-open "/dev/tty" sb-unix:o-rdwr 0))) (let ((tty-fd (sb-unix:unix-open "/dev/tty" 2 0))) ; O_RDWR = 2
(when tty-fd (when tty-fd
(unwind-protect (unwind-protect
(let* ((winsize (sb-alien:make-alien sb-alien:unsigned-short 4))) (let* ((winsize (sb-alien:make-alien sb-alien:unsigned-short 4)))

View File

@@ -36,7 +36,7 @@
(sb-alien:free-alien winsize)))) (sb-alien:free-alien winsize))))
;; Direct ioctl on /dev/tty — opens the real controlling terminal. ;; Direct ioctl on /dev/tty — opens the real controlling terminal.
(ignore-errors (ignore-errors
(let ((tty-fd (sb-unix:unix-open "/dev/tty" sb-unix:o-rdwr 0))) (let ((tty-fd (sb-unix:unix-open "/dev/tty" 2 0))) ; O_RDWR = 2
(when tty-fd (when tty-fd
(unwind-protect (unwind-protect
(let* ((winsize (sb-alien:make-alien sb-alien:unsigned-short 4))) (let* ((winsize (sb-alien:make-alien sb-alien:unsigned-short 4)))