From 0e845eee9c8fcc754e9f6a238750fd93822b9506 Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 7 Oct 2004 13:38:52 +0000 Subject: [PATCH] add comments about race condx --- perl/importwwv.pl | 4 ++++ 1 file changed, 4 insertions(+) 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"; } -- 2.34.1