0.9.1.11:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 1 Jun 2005 11:22:59 +0000 (11:22 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 1 Jun 2005 11:22:59 +0000 (11:22 +0000)
Merge patch ("SOCKET-CLOSE closes different socket's fd stream"
Tony Martinez sbcl-devel 2004-10-25 *sigh*)
... there's a suspicious-looking bit of stuff in the cond clause
above it, too: what happens if closing the stream causes
an error?  FIXME.

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

diff --git a/NEWS b/NEWS
index 0061745..6cdd681 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ changes in sbcl-0.9.2 relative to sbcl-0.9.1:
     Sascha Wilde)
   * bug fix: more cleanups to the floating point exception handling on
     x86-64 (thanks to James Knight)
+  * contrib improvement: it's harder to cause SOCKET-CLOSE to close()
+    the wrong file descriptor.  (thanks to Tony Martinez)
   * fixed some bugs revealed by Paul Dietz' test suite:
     ** Invalid dotted lists no longer raise a read error when 
        *READ-SUPPRESS* is T
index 06ca1e3..0fb00e5 100644 (file)
@@ -253,7 +253,10 @@ stream instead"))
               (if (= (sockint::close fd) -1)
                   (socket-error "close"))
             (bad-file-descriptor-error (c) (declare (ignore c)) nil)
-            (:no-error (c)  (declare (ignore c)) nil))))))
+            (:no-error (c)
+               (declare (ignore c))
+               (setf (slot-value socket 'file-descriptor) -1)
+               nil))))))
 
     
 (defgeneric socket-make-stream (socket  &rest args)
index 42af7d1..f79ef1c 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.1.10"
+"0.9.1.11"