From 1f77eb1b15dad4e51c64133cd354dab2de11013e Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Sat, 3 Jun 2006 21:31:33 +0000 Subject: [PATCH] 0.9.13.24: 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 | 11 ++++++++--- version.lisp-expr | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/sb-bsd-sockets/sockets.lisp b/contrib/sb-bsd-sockets/sockets.lisp index 54ac2ec..554d11b 100644 --- a/contrib/sb-bsd-sockets/sockets.lisp +++ b/contrib/sb-bsd-sockets/sockets.lisp @@ -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")) diff --git a/version.lisp-expr b/version.lisp-expr index 2cb00d2..b67093a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4