0.9.13.24:
authorJuho Snellman <jsnell@iki.fi>
Sat, 3 Jun 2006 21:31:33 +0000 (21:31 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sat, 3 Jun 2006 21:31:33 +0000 (21:31 +0000)
Fix a bug with the EAGAIN/EINTR handling of SB-BSD-SOCKETS:SOCKET-SEND.
        Add EINTR handling to SOCKET-ACCEPT and SOCKET-RECEIVE.

contrib/sb-bsd-sockets/sockets.lisp
version.lisp-expr

index 54ac2ec..554d11b 100644 (file)
@@ -96,7 +96,9 @@ values"))
                                sockaddr
                                (size-of-sockaddr socket))))
       (cond
-        ((and (= fd -1) (= sockint::EAGAIN (sb-unix::get-errno)))
+        ((and (= fd -1)
+              (member (sb-unix::get-errno)
+                      (list sockint::EAGAIN sockint::EINTR)))
          nil)
         ((= fd -1) (socket-error "accept"))
         (t (apply #'values
@@ -200,7 +202,10 @@ small"))
                                         sockaddr
                                         (sb-alien:addr sa-len))))
                 (cond
-                  ((and (= len -1) (= sockint::EAGAIN (sb-unix::get-errno))) nil)
+                  ((and (= len -1)
+                        (member (sb-unix::get-errno)
+                                (list sockint::EAGAIN sockint::EINTR)))
+                   nil)
                   ((= len -1) (socket-error "recvfrom"))
                   (t (loop for i from 0 below len
                            do (setf (elt buffer i)
@@ -276,7 +281,7 @@ send(2) will be called instead. Returns the number of octets written."))
     (cond
       ((and (= len -1)
             (member (sb-unix::get-errno)
-                    '(sockint::EAGAIN sockint::EINTR)))
+                    (list sockint::EAGAIN sockint::EINTR)))
        nil)
       ((= len -1)
        (socket-error "sendto"))
index 2cb00d2..b67093a 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.13.23"
+"0.9.13.24"