Skip to content

Instantly share code, notes, and snippets.

@e0da
Created July 14, 2021 00:25
Show Gist options
  • Save e0da/5a784811549e059e8fd262d8c091819d to your computer and use it in GitHub Desktop.
Save e0da/5a784811549e059e8fd262d8c091819d to your computer and use it in GitHub Desktop.
Expand ulimit on bash login
# Add to .bash_profile to prevent processes from running out of file handles
# Limit determined by guess and check on macOS 10.15.7 Catalina
if uname | grep -q Darwin; then
# ulimit -n is OK because we already confirmed it's macOS
# shellcheck disable=SC2039
ulimit -n "${ULIMIT_N:-49152}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment