in reply to A file revert back to its original contents
flock is your friend. Or sysopen which is even better as it lets you do an atomic open and LOCK_EX.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print