Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Update of /cvsroot/sbcl/sbcl/src/code
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11196/src/code
126.96.36.199: better DELETE-FILE on streams
* Don't close the stream on Unix, so users can enjoy the normal
Unixy-IO to unlinked files.
* On Windows, close the stream with :ABORT NIL, so that there
is no danger of close trying to delete file as well.
Bug with DELETE-FILE trying to delete files twice reported by
RCS file: /cvsroot/sbcl/sbcl/src/code/filesys.lisp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- filesys.lisp 21 Jun 2009 21:59:23 -0000 1.86
+++ filesys.lisp 31 Jul 2009 09:11:16 -0000 1.87
@@ -471,17 +471,17 @@
(defun delete-file (file)
- "Delete the specified FILE."
- (let* ((truename (probe-file file))
- (namestring (when truename
- (native-namestring truename :as-file t))))
+ "Delete the specified FILE.
+If FILE is a stream, on Windows the stream is closed immediately. On Unix
+plaforms the stream remains open, allowing IO to continue: the OS resources
+associated with the deleted file remain available till the stream is closed as
+per standard Unix unlink() behaviour."
+ (let* ((truename (truename file))
+ (namestring (native-namestring truename :as-file t)))
(when (streamp file)
- (close file :abort t))
- (unless namestring
- (error 'simple-file-error
- :pathname file
- :format-control "~S doesn't exist."
- :format-arguments (list file)))
+ (close file))
(multiple-value-bind (res err) (sb!unix:unix-unlink namestring)
(simple-file-perror "couldn't delete ~A" namestring err))))