Hi,

On SBCL, providing :timeout NIL to wait-for-input returns immediately even when there is no input on any of the provided sockets (the documentation says it should wait indefinitely).

Attached is a patch (svn diff) which fixes this, but I am not very sure about how sb-unix:unix-fast-select works, so its be best if someone who knows better can review it before committing this patch. :)

Cheers,
Chaitanya

Index: backend/sbcl.lisp
===================================================================
--- backend/sbcl.lisp	(revision 482)
+++ backend/sbcl.lisp	(working copy)
@@ -353,7 +353,7 @@
                 (1+ (reduce #'max (wait-list-%wait sockets)
                             :key #'sb-bsd-sockets:socket-file-descriptor))
                 (sb-alien:addr rfds) nil nil
-                (when timeout secs) musecs)
+                (when timeout secs) (when timeout musecs))
 	     (if (null count)
 		 (unless (= err sb-unix:EINTR)
 		   (error (map-errno-error err)))
_______________________________________________
usocket-devel mailing list
usocket-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel

Reply via email to