Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions release_notes/release_notes.stex
Original file line number Diff line number Diff line change
Expand Up @@ -2987,6 +2987,12 @@ in fasl files does not generally make sense.
%-----------------------------------------------------------------------------
\section{Bug Fixes}\label{section:bugfixes}

\subsection{Eager port closing on error in \scheme{open-source-file} (10.4.0)}

When \scheme{open-source-file} fails on a non-seekable device, the file descriptor port
was kept open until the garbage collector eventually closed it. It now closes the port on
error.

\subsection{Signals in non-Scheme threads (10.4.0)}

A bug in threaded Chez Scheme where some signals raised in non-Scheme threads could cause
Expand Down
15 changes: 8 additions & 7 deletions s/read.ss
Original file line number Diff line number Diff line change
Expand Up @@ -1720,13 +1720,14 @@
(set! paths-tried (cons path paths-tried))
(guard (c [#t #f])
(let ([ip ($open-file-input-port '$open-source-file path)])
(if (let ([new-sfd ($source-file-descriptor path ip)])
(and (fx= (source-file-descriptor-crc new-sfd)
(source-file-descriptor-crc sfd))
(= (source-file-descriptor-length new-sfd)
(source-file-descriptor-length sfd))))
(transcoded-port ip (current-transcoder))
(begin (close-input-port ip) #f)))))))))
(guard (c [#t (close-input-port ip) #f])
(if (let ([new-sfd ($source-file-descriptor path ip)])
(and (fx= (source-file-descriptor-crc new-sfd)
(source-file-descriptor-crc sfd))
(= (source-file-descriptor-length new-sfd)
(source-file-descriptor-length sfd))))
(transcoded-port ip (current-transcoder))
(begin (close-input-port ip) #f))))))))))
(define (search name dir*)
(and (not (null? dir*))
(or (source-port
Expand Down