From 1951337cfe5993e14a5f25c6a941950de9f1498c Mon Sep 17 00:00:00 2001 Message-Id: <1951337cfe5993e14a5f25c6a941950de9f1498c.1746782737.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 26 Aug 2020 13:11:42 +0100 Subject: [PATCH] dot/profile: Reduce the default ulimit a smidge. Organization: Straylight/Edgeware From: Mark Wooding 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. --- dot/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- [mdw]