1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

read-and-compile closes input file after seeing EOF

* module/system/base/compile.scm (read-and-compile): Close the input
  port after we read all of its data.  Perhaps this cleans up some NFS
  ghosts that David Pirotte was seeing.
This commit is contained in:
Andy Wingo 2013-01-21 19:07:19 +01:00
parent f6fd2c03a5
commit b3219085d9

View file

@ -1,6 +1,6 @@
;;; High-level compiler interface
;; Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@ -200,6 +200,7 @@
(let ((x ((language-reader (current-language)) port cenv)))
(cond
((eof-object? x)
(close-port port)
(compile ((language-joiner joint) (reverse exps) env)
#:from joint #:to to
;; env can be false if no expressions were read.