GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

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. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

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. 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 ( & ). 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. However, its usage is allowed in GNU Bash as an extension. 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 . Various forms of such a fork bomb have been created.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Fork bomb". 1788719686. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1373594455

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·