ulimit -c 0
# Raise soft limits to hard limits for NetBSD/OpenBSD.
-# We need at least 256 files and ~300 MB of bss.
-# On OS X ulimit -S -n rejects 'unlimited'.
-#
-# Note that ulimit -S -n may fail if ulimit -H -n is set higher than a
-# non-root process is allowed to set the high limit.
-# This is a system misconfiguration and should be fixed on the
-# broken system, not "fixed" by ignoring the failure here.
-# See longer discussion on golang.org/issue/7381.
-[ "$(ulimit -H -n)" = "unlimited" ] || ulimit -S -n $(ulimit -H -n)
+# We need at least ~300 MB of bss.
[ "$(ulimit -H -d)" = "unlimited" ] || ulimit -S -d $(ulimit -H -d)
# Thread count limit on NetBSD 7.