I'm looking at some Perl code (not mine) that does this (simplified for clarity):
open(INFILE, "<$filename"); flock INFILE, LOCK_EX; open(OUTFILE, ">$tempname"); flock OUTFILE, LOCK_EX; ... (read from INFILE, change stuff, write to OUTFILE) ... rename $tempname, $filename; flock OUTFILE, LOCK_UN; close(OUTFILE); flock INFILE, LOCK_UN; close(INFILE); Notice that it's renaming/deleting files that are open and locked. Is this as insane as I think it is? Thanks, -- Rod http://www.sunsetsystems.com/ _______________________________________________ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
