From: Daniel Barlow Date: Wed, 26 Nov 2003 16:31:57 +0000 (+0000) Subject: 0.8.6.3 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=42bcf553ca92dd484a41c1b0c67c7450f86f17c1;p=sbcl.git 0.8.6.3 Fix finalization bug in sb-bsd-sockets contrib that was causing strange SLIME errors Add SUPPORT file with advice on mailing list etiquette and suggestions for where to go if you need more help (note for consultants: add yourself to this list) --- diff --git a/SUPPORT b/SUPPORT new file mode 100644 index 0000000..0250eb6 --- /dev/null +++ b/SUPPORT @@ -0,0 +1,55 @@ + +* Mailing lists + +Your first recourse for support should probably be to the mailing list + sbcl-help@lists.sourceforge.net + +Remember that the people answering your qwuestion are volunteers, so +you stand a much better chance of getting a good answer if you ask a +good question: before sending mail, check + +- the list archives, to check if your question has been answered already + http://sourceforge.net/mailarchive/forum.php?forum_id=4134 + + or (same list, different archive) + + http://news.gmane.org/gmane.lisp.steel-bank.general + +- the BUGS file, to see if we know about it. Note that some of the + bugs in this file are old and it might be useful to have fresh reports, + in particular if you have new information that might help debugging + +- advice on how to report bugs and ask questions that people want to + answer + + http://www.chiark.greenend.org.uk/~sgtatham/bugs.html + http://www.catb.org/~esr/faqs/smart-questions.html + + +* Consultants + +There is no formal organization developing SBCL, but if you need a +paid support arrangement or custom SBCL development, we maintain a +list of consultants in this file. Use it to identify consultants with +appropriate skills and interests, and contact them directly. + +The compilers of this file have made no attempt to verify the accuracy +of the information or the competence of the people listed: you must +make your own judgement of suitability from the available information +- refer to the links they provide, the CREDITS file, mailing list +archives, CVS commit messages, and so on. Please feel free to ask for +advice on the sbcl-help list. + +Name: Daniel Barlow +Email: dan@metacircles.com +PGP: 1024D/75908913 : FC7 3143 7340 DECA D17A 357D 1C32 B966 7590 8913 +Web: http://web.metacircles.com/sbcl +Expertise: Lowlevel issues (threads, GC, runtime support). Ports to new systems. Network/web applications. ASDF, asdf-install, contrib issues. +Offerings: Custom programming. Email-based support (per-incident). + + +[ If you provide SBCL-related services, please add your details to +this file keeping alphabetical order by surname, following the +template used by existing entries. Patches are welcome from those +with no CVS commit access. We don't maintain a PGP keyring, so please +ensure your key can be found on the public servers ] diff --git a/contrib/sb-bsd-sockets/sockets.lisp b/contrib/sb-bsd-sockets/sockets.lisp index d62a57d..c182cee 100644 --- a/contrib/sb-bsd-sockets/sockets.lisp +++ b/contrib/sb-bsd-sockets/sockets.lisp @@ -207,19 +207,27 @@ stream instead")) ;; descriptor). Presumably this is an oversight and we could also ;; get anything that write(2) would have given us. - ;; What we do: we catch EBADF. It should only ever happen if - ;; (a) someone's closed the socket already (stream closing seems - ;; to have this effect) or (b) the caller is messing around with - ;; socket internals. That's not supported, dude - - (if (slot-boundp socket 'stream) - (close (slot-value socket 'stream)) ;; closes socket as well - (handler-case - (if (= (sockint::close (socket-file-descriptor socket)) -1) - (socket-error "close")) - (bad-file-descriptor-error (c) (declare (ignore c)) nil) - (:no-error (c) (declare (ignore c)) nil)))) + ;; note that if you have a socket _and_ a stream on the same fd, + ;; the socket will avoid doing anything to close the fd in case + ;; the stream has done it already - if so, it may have been + ;; reassigned to some other file, and closing it would be bad + + (let ((fd (socket-file-descriptor socket))) + (cond ((eql fd -1) ; already closed + nil) + ((slot-boundp socket 'stream) + (close (slot-value socket 'stream)) ;; closes fd + (setf (slot-value socket 'file-descriptor) -1) + (slot-makunbound socket 'stream)) + (t + (sb-ext:cancel-finalization socket) + (handler-case + (if (= (sockint::close fd) -1) + (socket-error "close")) + (bad-file-descriptor-error (c) (declare (ignore c)) nil) + (:no-error (c) (declare (ignore c)) nil)))))) + (defgeneric socket-make-stream (socket &rest args) (:documentation "Find or create a STREAM that can be used for IO on SOCKET (which must be connected). ARGS are passed onto diff --git a/version.lisp-expr b/version.lisp-expr index a45b118..d5c02ae 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.8.6.2" +"0.8.6.3"