X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fimportwwv.pl;h=2a86e0dee74164210f3db4a538c1cde8ec2fda40;hb=6f20114b034d329c1e2a4f91f0aba2f6ec4002d4;hp=bca63688e28751f68dd1817f42524787f8bd126d;hpb=45495d980ec748f19509c7668d6b92a06f216ed7;p=spider.git 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"; }