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 /
Time-HiRes /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
Watchdog.pm
1.63
KB
-r--r--r--
2014-12-27 11:48
alarm.t
5.83
KB
-r--r--r--
2014-12-27 11:48
clock.t
2.65
KB
-r--r--r--
2014-12-27 11:48
gettimeofday.t
757
B
-r--r--r--
2014-12-27 11:48
itimer.t
1.69
KB
-r--r--r--
2014-12-27 11:48
nanosleep.t
838
B
-r--r--r--
2014-12-27 11:48
sleep.t
811
B
-r--r--r--
2014-12-27 11:48
stat.t
2.42
KB
-r--r--r--
2014-12-27 11:48
time.t
551
B
-r--r--r--
2014-12-27 11:48
tv_interval.t
186
B
-r--r--r--
2014-12-27 11:48
ualarm.t
2.65
KB
-r--r--r--
2014-12-27 11:48
usleep.t
1.92
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
package t::Watchdog; use strict; use Config; use Test::More; my $waitfor = 360; # 30-45 seconds is normal (load affects this). my $watchdog_pid; my $TheEnd; if ($Config{d_fork}) { note "I am the main process $$, starting the watchdog process..."; $watchdog_pid = fork(); if (defined $watchdog_pid) { if ($watchdog_pid == 0) { # We are the kid, set up the watchdog. my $ppid = getppid(); note "I am the watchdog process $$, sleeping for $waitfor seconds..."; sleep($waitfor - 2); # Workaround for perlbug #49073 sleep(2); # Wait for parent to exit if (kill(0, $ppid)) { # Check if parent still exists warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded!\n"; note "Terminating main process $ppid..."; kill('KILL', $ppid); note "This is the watchdog process $$, over and out."; } exit(0); } else { note "The watchdog process $watchdog_pid launched, continuing testing..."; $TheEnd = time() + $waitfor; } } else { warn "$0: fork failed: $!\n"; } } else { note "No watchdog process (need fork)"; } END { if ($watchdog_pid) { # Only in the main process. my $left = $TheEnd - time(); note sprintf "I am the main process $$, terminating the watchdog process $watchdog_pid before it terminates me in %d seconds (testing took %d seconds).", $left, $waitfor - $left; if (kill(0, $watchdog_pid)) { local $? = 0; my $kill = kill('KILL', $watchdog_pid); # We are done, the watchdog can go. wait(); note sprintf "kill KILL $watchdog_pid = %d", $kill; } unlink("ktrace.out"); # Used in BSD system call tracing. note "All done."; } } 1;