mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
Fix "non-revealed port is closed" ports.test
Don't close the test port's file descriptor because the port still has a reference to it, and could still close it at any time when finally garbage collected. This did soemetimes break subsequent tests. Bug: https://debbugs.gnu.org/43521
This commit is contained in:
parent
f18f670223
commit
6e82a4516a
1 changed files with 4 additions and 3 deletions
|
@ -623,9 +623,10 @@
|
||||||
(seek fdes 0 SEEK_CUR)
|
(seek fdes 0 SEEK_CUR)
|
||||||
|
|
||||||
;; If we get here, it might be because PORT was not GC'd, we
|
;; If we get here, it might be because PORT was not GC'd, we
|
||||||
;; don't know (and we can't use a guardian because it would keep
|
;; don't know, and we can't use a guardian because it would keep
|
||||||
;; PORT alive.)
|
;; PORT alive, and we can't close the descriptor because
|
||||||
(close-fdes fdes)
|
;; subseuqent opens may re-use it, and then if this port is
|
||||||
|
;; garbage collected, it'll close the descriptor unexpectedly.
|
||||||
(throw 'unresolved))
|
(throw 'unresolved))
|
||||||
(lambda args
|
(lambda args
|
||||||
(system-error-errno args)))))
|
(system-error-errno args)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue