On posix, the rename(2) syscall has am important atomic semantic:
If newpath already exists it will be atomically replaced (subject
to a few conditions - see ERRORS below), so that there is no
point at which another process attempting to access newpath will
find it missing.
If newpath exists but the operation fails for some reason rename
guarantees to leave an instance of newpath in place.
cmucl, sbcl, gcl, ecls all understand this semantic and implement
RENAME-FILE using this posix syscall.
Unfortunately, clisp doesn't. When there already exists a file under
the target name, it returns an error instead of applying the standard
This prevent us to write safe atomic updating of files on posix
systems with clisp without resolving to unportable code.
I strongly suggest that clisp implementation of RENAME-FILE be changed
to use rename(2) plainly on posix systems.
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.
Get latest updates about Open Source Projects, Conferences and News.