refactor and add more linux extensions and libraries

This commit is contained in:
crazywhalecc
2023-03-26 22:27:51 +08:00
parent 17e0265ed0
commit 84b1732683
38 changed files with 1059 additions and 360 deletions

View File

@@ -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');
}