Skip to content

Commit

Permalink
BugFix/Fix CPU Count Function for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstrictM committed Jan 17, 2025
1 parent 10e669d commit 2bd7827
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/OperatingSystems/FreeBSD.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ public function getCpuCount(): int {
$numCpu = -1;

try {
$numCpu = intval($this->executeCommand('sysctl -n hw.ncpu')); //TODO: this should be tested if it actually works on FreeBSD
$numCpu = intval($this->executeCommand('/sbin/sysctl -n hw.ncpu'));
} catch (RuntimeException) {
return $numCpu;
}

return $numCpu;
Expand Down

0 comments on commit 2bd7827

Please sign in to comment.