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 /
cpan /
File-Temp /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
cmp.t
1.1
KB
-r--r--r--
2014-12-27 11:48
fork.t
2.04
KB
-r--r--r--
2014-12-27 11:48
lock.t
1.29
KB
-r--r--r--
2014-12-27 11:48
mktemp.t
2.4
KB
-r--r--r--
2014-12-27 11:48
object.t
4.38
KB
-r--r--r--
2014-12-27 11:48
posix.t
1.45
KB
-r--r--r--
2014-12-27 11:48
rmtree.t
898
B
-r--r--r--
2014-12-27 11:48
security.t
2.91
KB
-r--r--r--
2014-12-27 11:48
seekable.t
1.39
KB
-r--r--r--
2014-12-27 11:48
tempfile.t
4.98
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
#!/usr/bin/perl $| = 1; # Note that because fork loses test count we do not use Test::More use strict; BEGIN { require Config; my $can_fork = $Config::Config{d_fork} || (($^O eq 'MSWin32' || $^O eq 'NetWare') and $Config::Config{useithreads} and $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ ); if ( $can_fork ) { print "1..8\n"; } else { print "1..0 # Skip No fork available\n"; exit; } } use File::Temp; # OO interface my $file = File::Temp->new(); myok( 1, -f $file->filename, "OO File exists" ); my $children = 2; for my $i (1 .. $children) { my $pid = fork; die "Can't fork: $!" unless defined $pid; if ($pid) { # parent process next; } else { # in a child we can't keep the count properly so we do it manually # make sure that child 1 dies first srand(); my $time = (($i-1) * 5) +int(rand(5)); print "# child $i sleeping for $time seconds\n"; sleep($time); my $count = $i + 1; myok( $count, -f $file->filename(), "OO file present in child $i" ); print "# child $i exiting\n"; exit; } } while ($children) { wait; $children--; } myok( 4, -f $file->filename(), "OO File exists in parent" ); # non-OO interface my ($fh, $filename) = File::Temp::tempfile( UNLINK => 1 ); myok( 5, -f $filename, "non-OO File exists" ); $children = 2; for my $i (1 .. $children) { my $pid = fork; die "Can't fork: $!" unless defined $pid; if ($pid) { # parent process next; } else { srand(); my $time = (($i-1) * 5) +int(rand(5)); print "# child $i sleeping for $time seconds\n"; sleep($time); my $count = 5 + $i; myok( $count, -f $filename, "non-OO File present in child $i" ); print "# child $i exiting\n"; exit; } } while ($children) { wait; $children--; } myok(8, -f $filename, "non-OO File exists in parent" ); # Local ok sub handles explicit number sub myok { my ($count, $test, $msg) = @_; if ($test) { print "ok $count - $msg\n"; } else { print "not ok $count - $msg\n"; } return $test; }