Hello ! I am now doing a test on the fork bomb with the command `:(){:|:&};:` and set `ulimit - c 1000`. And everything was well in bash-5.0, but there was a problem in bash-5.1.
The main performance is that the system memory has been rising, and then the kernel appears the oom, I found that the memory increase may be caused by the following reasons: First, systemd will send a sigterm to bash, but in bash-5.1, the bash process will not be killed. this was caused by a change in bash 5.1. The modified change information is as follows ``` sss. Fix a bug where receiving SIGTERM from a different process while readline was active could cause the shell to terminate ``` Second, When bash fork is a child process, it always creates a memory to manage the job, even if the maximum number set by the ulimit command is reached ``` int stop_pipeline(async, deferred) int async; COMMAND *deferred; { ... ... if (js.jobslots == 0) { ... ... jobs = (JOB **)xmalloc(js.j_jobslots * sizeof(JOB *)); ... ... } ... ... if (i == js.jobslots) { ... ... jobs = (JOB **)xrealloc(js.j_jobslots * sizeof(JOB *)); ... ... } } ``` After my own positioning, the above is probably the reason for the memory increase. Could you tell me how to avoid or optimize memory increase ? thanks ??