in reply to Re^3: Writing to a file atomically without renaming
in thread Writing to a file atomically without renaming
no. worse case is when you are "rolling back" that another user on your multi user system steals the disk space needed for the cat backupfile > file between the time the > zeros file out and the time cat is done -- leaving you with a broken file. That is why the unlink,rename method is popular -- at no time do you destroy the rollback until the new file is in place.
-Waswas
-Waswas
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Writing to a file atomically without renaming
by Transient (Hermit) on Jun 30, 2005 at 23:16 UTC | |
by waswas-fng (Curate) on Jun 30, 2005 at 23:22 UTC | |
by Transient (Hermit) on Jul 01, 2005 at 02:45 UTC |
In Section
Seekers of Perl Wisdom