WL4189 Active state perl fixes
This commit is contained in:
parent
87b91e547d
commit
e75daedf17
@ -65,9 +65,11 @@ BEGIN {
|
|||||||
#
|
#
|
||||||
|
|
||||||
use Memoize;
|
use Memoize;
|
||||||
memoize('mixed_path');
|
if (!IS_WIN32PERL){
|
||||||
memoize('native_path');
|
memoize('mixed_path');
|
||||||
memoize('posix_path');
|
memoize('native_path');
|
||||||
|
memoize('posix_path');
|
||||||
|
}
|
||||||
|
|
||||||
sub mixed_path {
|
sub mixed_path {
|
||||||
my ($path)= @_;
|
my ($path)= @_;
|
||||||
|
@ -212,6 +212,14 @@ sub timer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$0= "safe_timer($duration)";
|
$0= "safe_timer($duration)";
|
||||||
|
|
||||||
|
if (IS_WIN32PERL){
|
||||||
|
# Just a thread in same process
|
||||||
|
sleep($duration);
|
||||||
|
print STDERR "timer $$: expired after $duration seconds\n";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
my $count_down= $duration;
|
my $count_down= $duration;
|
||||||
while($count_down--){
|
while($count_down--){
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ sub _kstat {
|
|||||||
my ($self)= @_;
|
my ($self)= @_;
|
||||||
while (1){
|
while (1){
|
||||||
my $instance_num= $self->{cpus} ? @{$self->{cpus}} : 0;
|
my $instance_num= $self->{cpus} ? @{$self->{cpus}} : 0;
|
||||||
my $list= `kstat -p -m cpu_info -i $instance_num`;
|
my $list= `kstat -p -m cpu_info -i $instance_num 2> /dev/null`;
|
||||||
my @lines= split('\n', $list) or last; # Break loop
|
my @lines= split('\n', $list) or last; # Break loop
|
||||||
|
|
||||||
my $cpuinfo= {};
|
my $cpuinfo= {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user