[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-312-gee5b13d
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 31 17:20:14 EDT 2010
The branch, 3.8-trunk has been updated
via ee5b13d1326fca5ebd2ac66ee457da0394be1267 (commit)
from 294f77da3dd9290387537646d5bbe77ae1fc1221 (commit)
Summary of changes:
lib/RT/Interface/Web/Handler.pm | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit ee5b13d1326fca5ebd2ac66ee457da0394be1267
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Mar 31 16:28:27 2010 -0400
Prevent servers using GnuPG from running out of filehandles
RT::Crypt::GnuPG uses File::Temp->tmpfile(UNLINK=>1) to create
temporary files. However, in scalar context, which returns filename
and filehandle, the files aren't actually unlinked, or the filehandles
closed, until the process exits. This poses problems for long-running
server processes. To mitigate this, we explicitly tell File::Temp to
close all pending tempfile handles, and remove the underlying files,
once per request.
diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
index 8d1be8d..6a06606 100644
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -219,6 +219,10 @@ sub CleanupRequest {
}
%RT::Ticket::MERGE_CACHE = ( effective => {}, merged => {} );
+
+ # Explicitly remove any tmpfiles that GPG opened, and close their
+ # filehandles.
+ File::Temp::cleanup;
}
# }}}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list