fix: unix-simple-poll returns T not integer, use if poll-result

This commit is contained in:
2026-05-15 13:10:02 -04:00
parent ce9bf7781a
commit 26e55e652f

View File

@@ -78,7 +78,7 @@
(let ((sap (sb-sys:vector-sap buf)))
(if timeout-ms
(let ((poll-result (sb-unix:unix-simple-poll fd :input timeout-ms)))
(if (and poll-result (plusp poll-result))
(if poll-result
(let ((n (sb-unix:unix-read fd sap 1)))
(if (= n 1) (aref buf 0) (values nil :eof)))
(values nil nil)))