This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Test-Simple to CPAN version 1.302067
[perl5.git] / Porting / bisect.pl
index 68d68d1..82b9ae7 100755 (executable)
@@ -61,8 +61,10 @@ if (!defined $jobs &&
         while (<$fh>) {
             ++$cpus if /^processor\s+:\s+\d+$/;
         }
-    } elsif (-x '/sbin/sysctl') {
-        $cpus =  $1 if `/sbin/sysctl hw.ncpu` =~ /^hw\.ncpu: (\d+)$/;
+    } elsif (-x '/sbin/sysctl' || -x '/usr/sbin/sysctl') {
+        my $sysctl =  '/sbin/sysctl';
+        $sysctl =  "/usr$sysctl" unless -x $sysctl;
+        $cpus =  $1 if `$sysctl hw.ncpu` =~ /^hw\.ncpu: (\d+)$/;
     } elsif (-x '/usr/bin/getconf') {
         $cpus = $1 if `/usr/bin/getconf _NPROCESSORS_ONLN` =~ /^(\d+)$/;
     }