Commit 55010049 authored by Magnus Svensson's avatar Magnus Svensson

WL4189 Active state perl fixes

parent 97ee313f
...@@ -65,9 +65,11 @@ BEGIN { ...@@ -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 { ...@@ -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 { ...@@ -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= {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment