Bug 5808 - temp files not removed
Summary: temp files not removed
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.2.4
Hardware: All other
: P3 normal
Target Milestone: 3.4.0
Assignee: SpamAssassin Developer Mailing List
Depends on:
Reported: 2008-02-06 06:51 UTC by Thomas Eisenbarth
Modified: 2012-05-14 22:44 UTC (History)
3 users (show)

Attachment Type Modified Status Actions Submitter/CLA Status
Delete a fulltext_tmpfile as created by some plugins on an unclean termination patch None Mark Martinec [HasCLA]
localize $@, otherwise test check_implemented.t was broken patch None Mark Martinec [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
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. 

  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
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.