The Forkbomb

Last updated: July 14, 2018

Image by Lapse via wallhaven

In this article, I will clarify how the harmless-looking Forkbomb function works.

Table of Contents

The function name

The first : is the name of the function and the () symbol means, that this indeed is a function.

The function body


Next, everything inside the {} symbols means, that the contents inside those symbols is the body of the function (or the activities which the function needs to run).

The recursion

Inside, we can notice :|:&. This means, that this function is a recursive function which means, in the body of the function, the function calls itself. In :|:, la output of the first : is redirected to the second :.

The background-ing

Next, after :|:, we also can see the & symbol which means, that the function will run as a background process.

The termination then invoking

Finally, after the {} symbols, the ; symbol means the end of the function. After that, we notice another :, however, it now means, that we’ll now invoke the function which we just defined.