"be consistent" | |
PerlMonks |
Re^4: Writing to a file atomically without renamingby waswas-fng (Curate) |
on Jun 30, 2005 at 22:38 UTC ( [id://471498]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|