Bug 5808

Summary: temp files not removed
Product: Spamassassin Reporter: Thomas Eisenbarth <nstsupport>
Component: spamassassinAssignee: SpamAssassin Developer Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: kmcgrail, lemke, parchondous
Priority: P3    
Version: 3.2.4   
Target Milestone: 3.4.0   
Hardware: All   
OS: other   
Whiteboard:
Attachments: Delete a fulltext_tmpfile as created by some plugins on an unclean termination
localize $@, otherwise test check_implemented.t was broken

Description Thomas Eisenbarth 2008-02-06 06:51:18 UTC
On both Linux and Windows some temp files are still not removed when
spamassassin receives a signal. 
Adding 

  if (defined $tempfile) {
    unlink $tempfile;
    $tempfile = undef;
  }

at the end of kill_handler in the spamassassin script helps, but temp files
created through

my $tmpf = $permsgstatus->create_fulltext_tmpfile($fulltext);

in dccproc_lookup (line 526 in the DCC.pm plugin) will still not be cleaned up
properly.
Comment 1 Daniel Lemke 2012-04-07 14:30:54 UTC
Cannot reproduce, some more information would be helpful.

Tested with SpamAssassin version 3.3.2, running on Perl version 5.14.2 under Window 7 Professional.

Temp files are created in %userprofile%\AppData\Local\Temp and correctly removed when spamassassin script has run through or in case of spamd, the daemon startup initialization has completed.

If no more information given, I suggest it to be closed as invalid.
Comment 2 Mark Martinec 2012-05-14 15:23:19 UTC
Created attachment 5060 [details]
Delete a fulltext_tmpfile as created by some plugins on an unclean termination
Comment 3 Mark Martinec 2012-05-14 15:24:44 UTC
trunk (3.4.0):

Bug 5808: temp files not removed
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1338255.
Comment 4 Kevin A. McGrail 2012-05-14 16:13:39 UTC
Considered fix by patch and no further ability to recreate
Comment 5 Mark Martinec 2012-05-14 22:44:19 UTC
Created attachment 5062 [details]
localize $@, otherwise test check_implemented.t was broken

Bug 5808, localize $@ in DESTROY
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1338469.