소스 검색

Merge pull request #1031 from scop/getconf

Get number of processors using getconf over cpuinfo grep
pull/1041/head
Yamashita, Yuu 8 년 전
committed by GitHub
부모
커밋
428a94b3ed
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -1
      plugins/python-build/bin/python-build

+ 2
- 1
plugins/python-build/bin/python-build 파일 보기

@ -155,7 +155,8 @@ num_cpu_cores() {
num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
;;
* )
num="$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l | xargs)"
num="$({ getconf _NPROCESSORS_ONLN ||
grep -c ^processor /proc/cpuinfo; } 2>/dev/null)"
num="${num#0}"
;;
esac

불러오는 중...
취소
저장