From: Christophe Rhodes Date: Thu, 21 Aug 2003 11:47:17 +0000 (+0000) Subject: 0.8.2.53: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=61b189e9b70c125a31eaf041a55e00b517cafbd3;p=sbcl.git 0.8.2.53: Fixed hanging-on-reader-error in Darwin (and Solaris, it turns out): ... Here's the deal: lseek(), on "certain devices", has "unspecified consequences" ... said devices include, empirically, /dev/stdin ... so lseek was merrily returning a success code despite clearly being incapable of rewinding the input stream ... so in our new error-reporting for reader errors, we were assuming because of the success value that we could read the erroneous input into a buffer... ... whereas we were rather sitting there waiting for more input. ... So protect the rereading code with an INTERACTIVE-STREAM-P. --- diff --git a/src/code/condition.lisp b/src/code/condition.lisp index a62586a..a441310 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -682,6 +682,17 @@ (let (lineno colno) (when (and pos (< pos sb!xc:array-dimension-limit) + ;; KLUDGE: lseek() (which is what FILE-POSITION + ;; reduces to on file-streams) is undefined on + ;; "some devices", which in practice means that it + ;; can claim to succeed on /dev/stdin on Darwin + ;; and Solaris. This is obviously bad news, + ;; because the READ-SEQUENCE below will then + ;; block, not complete, and the report will never + ;; be printed. As a workaround, we exclude + ;; interactive streams from this attempt to report + ;; positions. -- CSR, 2003-08-21 + (not (interactive-stream-p error-stream)) (file-position error-stream :start)) (let ((string (make-string pos diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index cc71851..ce07516 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -871,7 +871,6 @@ (:element-type (fd-stream-element-type fd-stream)) (:interactive-p - ;; FIXME: sb!unix:unix-isatty is undefined. (= 1 (the (member 0 1) (sb!unix:unix-isatty (fd-stream-fd fd-stream))))) (:line-length diff --git a/version.lisp-expr b/version.lisp-expr index d01d91b..102e8ac 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.2.52" +"0.8.2.53"