mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 07:15:38 +08:00
refactor and add more linux extensions and libraries
This commit is contained in:
@@ -19,7 +19,7 @@ class SystemUtil
|
||||
*/
|
||||
public static function getCpuCount(): int
|
||||
{
|
||||
f_exec('sysctl -n hw.ncpu', $output, $ret);
|
||||
[$ret, $output] = shell()->execWithResult('sysctl -n hw.ncpu');
|
||||
if ($ret !== 0) {
|
||||
throw new RuntimeException('Failed to get cpu count');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user