Add comment on our test
authorHeiko Schlittermann <hs@schlittermann.de>
Tue, 21 Jun 2016 16:18:10 +0200
branchtest
changeset 34 744983a36338
parent 33 307dbb1d05a5
child 35 765b680bcc0d
child 36 3b83a62272f9
Add comment on our
lib/Nagios/Check/DNS/check_tlsa_record.pm
--- a/lib/Nagios/Check/DNS/check_tlsa_record.pm	Tue Jun 21 16:14:56 2016 +0200
+++ b/lib/Nagios/Check/DNS/check_tlsa_record.pm	Tue Jun 21 16:18:10 2016 +0200
@@ -17,6 +17,8 @@
 my $dane_pattern = qr'^(?<record>(?<tlsa_usage>\d+)\s+(?<tlsa_selector>\d+)\s+(?<tlsa_match_type>\d+)\s+(?<tlsa_hash>[0-9a-f ]+))$';
 my $with_cname   = qr'^(?<cname>[_a-z]+.*\n).*';
 
+# keep in in 'our' to avoid garbage collection and destruction
+# of the File::Temp object
 our $tmpfile = File::Temp->new();
 my $fdname = '/dev/fd/' . fileno $tmpfile;
 fcntl($tmpfile, F_SETFD, fcntl($tmpfile, F_GETFD, 0) & ~FD_CLOEXEC)