My point is why bash terminates when it runs an external command that requires a large memory. Shouldn't bash return an exit code on behalf of the failed command and continue to the next command?
On Sunday, November 6, 2016, Eduardo Bustamante <
dualbus@gmail.com> wrote:
Hi Peng. Read the link you provided again. xmalloc is not an
alternative version of malloc. It's just a common wrapper function
around malloc. You can go and see for yourself, the definition is
here: http://git.savannah.gnu.org/cgit/bash.git/tree/xmalloc.c#n97
If you want the rest of the commands execute properly, then make sure
that there's enough memory in the system, and remove artificial
restrictions (ulimit -v?). There's no trick here, and certainly no bug
in bash.