https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7138

Bill Cole <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Bill Cole <[email protected]> ---
Or: just swap those two lines, since die'ing with an open pipe is not exactly a
harmful event and in any case it's extremely unlikely that the unlink will fail
for a tempfile created 16 lines earlier. 

(It turns out I guessed wrong about the tempdir created and removed by
sa-compile. It's only for the compile phase.) 

The fix is:

--- lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm       (revision
1815771)
+++ lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm       (working copy)
@@ -528,8 +528,8 @@
   while ( $nread=read(IN,$inbuf,16384) ) { $fullstr .= $inbuf }
   defined $nread  or die "error reading from pipe: $!";

+  unlink $tmpf  or die "cannot unlink $tmpf: $!";
   close IN      or die "error closing pipe: $!";
-  unlink $tmpf  or die "cannot unlink $tmpf: $!";
   defined $fullstr  or warn "empty result from a pipe";

   # now parse the -Mre=debug output.



Committed to trunk (1815772) and 3.4 branch (1815773)

Incidentally: --keep-files only applies to the compilation phase tempfiles.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to