WL4189 Active state perl fixes

This commit is contained in:
Magnus Svensson 2008-10-08 20:25:28 +02:00
parent 87b91e547d
commit e75daedf17
3 changed files with 14 additions and 4 deletions

View File

@ -65,9 +65,11 @@ BEGIN {
#
use Memoize;
memoize('mixed_path');
memoize('native_path');
memoize('posix_path');
if (!IS_WIN32PERL){
memoize('mixed_path');
memoize('native_path');
memoize('posix_path');
}
sub mixed_path {
my ($path)= @_;

View File

@ -212,6 +212,14 @@ sub timer {
};
$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;
while($count_down--){

View File

@ -76,7 +76,7 @@ sub _kstat {
my ($self)= @_;
while (1){
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 $cpuinfo= {};