Fork Bombs have been around in shells since the first Unix shell was written.
Examples of Unix/Linux fork bombs include:
:(){ :|: & };: $0 & $0 &
The first example is often used by system administrators to test user processes limitations.
Once a successful fork bomb has been activated on a system it may not be possible to resume normal operations on the system without rebooting, as the only solution to a fork bomb is to destroy all instances of it.
Probably the best way to prevent a user invoking a fatal fork bomb on Linux is to add the user to /etc/security/limits.conf file and impose process limitations.