Date: Wed, 25 Oct 2017 21:21:23 -0700 From: Alex Coffin <alexcoffin1...@gmail.com> Message-ID: <CAJBo8Oe3ZaeGMT8y-itovJ=xr8duu6csnayxabcifauo+gg...@mail.gmail.com>
| Run the following script (assuming you trust me lol): | function sleep { | local dur | dur="$1" | # if replaced with "echo" no segfault. | sleep ${dur}s | } | "sleep" $((5)) This one is easy, your function is calling itself recursively, (sleep, calls sleep, calls sleep, calls sleep ....) until the stack runs out. When you make the (internal) sleep be echo, the problem vanishes... You can fix it by renaming the function to be something other than sleep, by replacing the inner sleep with "command sleep" so it won't run the function, or by replacing it with /bin/sleep (or wherever sleep is found on your system.) kre