You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/02/11 18:18:38 UTC
svn commit: r506071 -
/spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached
Author: jm
Date: Sun Feb 11 09:18:36 2007
New Revision: 506071
URL: http://svn.apache.org/viewvc?view=rev&rev=506071
Log:
use tmp files
Modified:
spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached
Modified: spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached?view=diff&rev=506071&r1=506070&r2=506071
==============================================================================
--- spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached (original)
+++ spamassassin/trunk/masses/tenpass/split-log-into-buckets-cached Sun Feb 11 09:18:36 2007
@@ -50,7 +50,7 @@
my $last = $numbuckets + $out->{c};
for ( ; $numbuckets < $last; $numbuckets++) {
# exploit the auto-syncing semantics of >>
- open ($buckets{$numbuckets}, ">>".$out->{out});
+ open ($buckets{$numbuckets}, ">>".$out->{out}.".tmp");
}
}
@@ -64,5 +64,8 @@
foreach my $i (1 .. $numbuckets) {
close $buckets{$i};
+}
+foreach my $out (@outs) {
+ rename $out->{out}.".tmp", $out->{out};
}