Invoke getconf correctly to extract the right number of cores

Reviewed By: jberdine

Differential Revision: D6408325

fbshipit-source-id: 485d20f
master
Martino Luca 7 years ago committed by Facebook Github Bot
parent 09a807fe0a
commit 5588f5e1ea

@ -480,7 +480,7 @@ let wrappers_dir = lib_dir ^/ "wrappers"
let ncpu =
try
Utils.with_process_in "getconf NPROCESSORS_ONLN_ 2>/dev/null" (fun chan ->
Utils.with_process_in "getconf _NPROCESSORS_ONLN 2>/dev/null" (fun chan ->
Scanf.bscanf (Scanf.Scanning.from_channel chan) "%d" (fun n -> n) )
|> fst
with _ -> 1

Loading…
Cancel
Save