Fork bomb - Simple English Wikipedia, the free encyclopedia Jump to content

Fork bomb

From Simple English Wikipedia, the free encyclopedia

A fork bomb is a way of stopping a computer from running by making many copies of a program. A fork bomb copies itself into more than two copies, which then copy themselves into four copies. Then both the original and the copy will keep making copies until the computer can no longer handle it and crash.

For example, a simple fork bomb using the bash shell script is :

 :(){ :|:& };:

Here, a function is defined by the name " : ". Inside the curly braces, this function is called and its output is given again to the same function. The " & " is used to run the process in background. The semicolon (" ; ") marks end of the function. The last colon (" : ") calls the function for first time. After that the function keeps on calling itself until computer runs out of memory.