From: minima Date: Thu, 7 Oct 2004 13:38:52 +0000 (+0000) Subject: add comments about race condx X-Git-Tag: R_1_52~260 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e845eee9c8fcc754e9f6a238750fd93822b9506;p=spider.git add comments about race condx --- diff --git a/perl/importwwv.pl b/perl/importwwv.pl index bca63688..2a86e0de 100755 --- a/perl/importwwv.pl +++ b/perl/importwwv.pl @@ -101,6 +101,10 @@ sub out open OUT, ">$tmp/$fn" or die "import $tmp/$fn $!"; print OUT map { "$_\n" } @_; close OUT; + + # Note we do this this way to make the appearance of + # the file in /spider/chat_import atomic. Otherwise there + # exists the possiblity of race conditions and other nasties link "$tmp/$fn", "$import/$fn"; unlink "$tmp/$fn"; }