summaryrefslogtreecommitdiff
path: root/Porting/bisect.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-07-23 18:28:52 -0600
committerKarl Williamson <khw@cpan.org>2016-08-30 08:30:53 -0600
commitf16e7fa35c1302aa056db5d8d022b7861c1dd2e8 (patch)
tree7b6518ebdc44bb6039eaa7531d81fff2869c924c /Porting/bisect.pl
parenta1ac675e7269d812eee0cef173c4a20776569d01 (diff)
downloadperl-f16e7fa35c1302aa056db5d8d022b7861c1dd2e8.tar.gz
Porting/bisect.pl: /usr/sbin/sysctl exists
Diffstat (limited to 'Porting/bisect.pl')
-rwxr-xr-xPorting/bisect.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/Porting/bisect.pl b/Porting/bisect.pl
index 68d68d135b..82b9ae7cde 100755
--- a/Porting/bisect.pl
+++ b/Porting/bisect.pl
@@ -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+)$/;
}