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/08/03 11:34:02 UTC
svn commit: r562396 - /spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm
Author: jm
Date: Fri Aug 3 02:34:01 2007
New Revision: 562396
URL: http://svn.apache.org/viewvc?view=rev&rev=562396
Log:
see if this works around odd Solaris AICache failures (see http://bbmass.spamassassin.org/mc-fast/builds/626/step-test/0 for an example)
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm?view=diff&rev=562396&r1=562395&r2=562396
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/AICache.pm Fri Aug 3 02:34:01 2007
@@ -159,12 +159,15 @@
local $SIG{'INT'} = 'IGNORE';
local $SIG{'TERM'} = 'IGNORE';
- if (!(open(CACHE, ">".$self->{cache_file})
- && print CACHE $towrite
- && close(CACHE)))
+ if (!open(CACHE, ">".$self->{cache_file}))
{
- warn "Can't write AI cache file (".$self->{cache_file}."): $!";
+ warn "open AI cache file failed (".$self->{cache_file}."): $!";
# TODO: should we delete it/clean it up?
+ }
+ else {
+ print CACHE $towrite;
+ close CACHE
+ or warn "close AI cache file failed (".$self->{cache_file}."): $!";
}
}