我仅追踪一个问题,即我不得不关闭我的阿帕奇特文的所有公开档案。 我将问题追踪到Parse:RecDescent。
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw/say/;
$|++;
print "Content-Type: text/plain
";
use Parse::RecDescent;
say "$$: pre-fork: ". time;
if(my $pid = fork) {
# parent
say "$$: return immediately: ". time;
}
else {
# child
say "$$: kicked off big process: ". time;
close STDIN;
close STDOUT;
close STDERR;
# close *{ Parse::RecDescent::ERROR };
sleep 5;
}
我的问题是,我如何找到所有公开的一揽子档案。
I know fileno
will return a counter for an open filehandle.
Is there a way to do a reverse lookup for these, or close filehandles by their fileno
counter?