|
SA Bugzilla – Full Text Bug Listing |
Summary: | [review] "spamassassin" script needs signal handlers | ||
---|---|---|---|
Product: | Spamassassin | Reporter: | Justin Mason <jm> |
Component: | spamassassin | Assignee: | SpamAssassin Developer Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | James.Wilkinson |
Priority: | P5 | ||
Version: | SVN Trunk (Latest Devel Version) | ||
Target Milestone: | 3.2.4 | ||
Hardware: | Other | ||
OS: | other | ||
Whiteboard: | ready for commit to 3.2 branch | ||
Bug Depends on: | |||
Bug Blocks: | 5557 | ||
Attachments: |
fix
fix r2 |
Description
Justin Mason
2007-08-24 09:33:21 UTC
While you're at it, please be sure to check if the signals HUP, INT, and KILL (1, 2, 15) are handled in a similar way. This should handle cleanup in other scenarios SpamAssassin users may run into, and maybe get rid of bug 5557, at least in the Unix versions. Created attachment 4129 [details] fix here's an implementation of that; it'll clean up the tmpfile on SIGINT, SIGHUP, SIGTERM and SIGPIPE. checked into trunk: : jm 81...; svn commit -m "bug 5626: install a signal handler for SIGHUP, SIGINT, SIGPIPE and SIGTERM which will remove leftover temp files" spamassassin.raw Sending spamassassin.raw Transmitting file data . Committed revision 578928. actually, that's not quite workable; the info() sub isn't imported. new fix to follow. Created attachment 4131 [details] fix r2 +1 +1 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. Any ideas to resolve this? |