I have been researching about fork bomb and how it can be prevented.

I have found two ways to safely execute fork bomb code.

One of them is to set ulimit either temporary or permanently.

Another way is to set FUNCNEST in bash,

export FUNCNEST=2

I recently learned about FUNCNEST and wondering if there is any other way to safely execute fork bomb?


You can run bash inside of a cgroup. All of its descendants will be restricted by the cgroup's resource limits.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .