From: Mark Wooding Date: Wed, 26 Aug 2020 12:11:42 +0000 (+0100) Subject: dot/profile: Reduce the default ulimit a smidge. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/1951337cfe5993e14a5f25c6a941950de9f1498c dot/profile: Reduce the default ulimit a smidge. The dash(1) shell has an awful bug on 32-bit systems. Although the limit is presented to the shell as a number of kilobytes, it's presented to the setrlimit(2) syscall as a number of /bytes/. It seems that dash(1) performs this calculation using 32-bit integers on 32-bit platforms, and, with the chosen default of 4194304, ends up with zero, and nothing can start up. Reduce the limit by a kilobyte to avoid frying dash(1)'s brain. --- diff --git a/dot/profile b/dot/profile index fd50a46..3884f67 100644 --- a/dot/profile +++ b/dot/profile @@ -113,7 +113,7 @@ done ## need a lot of memory for a legitimate reason than for it to be a memory ## leak or some other bug that's going to cause swap death for no good ## reason. -ulimit -Sv $(mdw-conf memory-limit 4194304) +ulimit -Sv $(mdw-conf memory-limit 4194303) ## Establish a temporary directory. case ${TMPDIR+t} in