Fork bomb
A fork bomb (also called rabbit virus or hydra virus) is a denial-of-service (DoS) attack against a computer where a process continually replicates itself to deplete available system resources, slowing down or crashing the system due to resource starvation.[src]
A fork bomb (also called rabbit virus or hydra virus) is a denial-of-service (DoS) attack against a computer where a process continually replicates itself to deplete available system resources, slowing down or crashing the system due to resource starvation.[src] A classic example of a fork bomb is one written in Unix shell :(){ :|:& };: , dating back to at least 1999, which can be more easily understood as fork() { fork | fork & }; fork In it, a function is defined ( fork() ) as calling itself ( fork ), then piping ( | ) its result into itself, all in a background job ( & ).[src] The code using a colon : as the function name is not valid in a shell as defined by POSIX, which only permits alphanumeric characters and underscores in function names.[src] However, its usage is allowed in GNU Bash as an extension.[src] The traditional C implementation (using the POSIX headers) is: include int main() { while (true) { fork(); } } This repeatedly calls the fork() function, duplicating the current process, in the header .[src] Various forms of such a fork bomb have been created.[src]
7 sentences · 7 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Fork bomb." encyclopegia.org, 2026, https://encyclopegia.org/wiki/fork-bomb. Accessed 03 December 2026.
Chicago
"Fork bomb." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/fork-bomb.
APA
encyclopegia.org. (2026). Fork bomb. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/fork-bomb
Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON