Open but closed stream after save-lisp-and-die

Bug #1938433 reported by Guillaume LE VAILLANT
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When using SAVE-LISP-AND-DIE in a session containing an open stream, it gets closed in the resulting image, but OPEN-STREAM-P still indicates that this stream is open.


(defparameter *stream* (open "/dev/urandom" :element-type '(unsigned-byte 8)))

(defun main ()
  (format t "open-stream-p: ~a~%" (open-stream-p *stream*))
  (format t "read-byte: ~a~%" (read-byte *stream*)))

(sb-ext:save-lisp-and-die "example" :executable t :toplevel 'main)

Running "sbcl --load example.lisp" and "./example" with SBCL 2.1.6 on GNU/Linux 5.13.5:

open-stream-p: T

debugger invoked on a SB-INT:CLOSED-SAVED-STREAM-ERROR in thread
#<THREAD "main thread" RUNNING {1002168103}>:
  #<SB-SYS:FD-STREAM for "file /dev/urandom" {1001140F93}> was closed by SB-EXT:SAVE-LISP-AND-DIE

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit from the current thread.

(SB-IMPL::CLOSED-FLAME-SAVED #<SB-SYS:FD-STREAM for "file /dev/urandom" {1001140F93}>)

Douglas Katzman (dougk)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers