Reduce |ulimit -n| on macOS to max supported amount
This commit is contained in:
parent
5afafd9146
commit
424612ea9d
|
@ -12,8 +12,15 @@ _() {
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $(ulimit -n) -lt 65000 ]]; then
|
maxOpenFds=65000
|
||||||
ulimit -n 65000 || echo 'Error: nofiles too small, run "ulimit -n 65000" to continue' && exit 1
|
if [[ $(uname) = Darwin ]]; then
|
||||||
|
maxOpenFds=24576 # Appears to be the max permitted on macOS...
|
||||||
|
fi
|
||||||
|
if [[ $(ulimit -n) -lt $maxOpenFds ]]; then
|
||||||
|
ulimit -n $maxOpenFds|| {
|
||||||
|
echo 'Error: nofiles too small, run "ulimit -n 65000" to continue';
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_ cargo build --all --verbose
|
_ cargo build --all --verbose
|
||||||
|
|
Loading…
Reference in New Issue