summaryrefslogtreecommitdiff
path: root/posts/understanding_the_bash_fork_bomb.rst
diff options
context:
space:
mode:
Diffstat (limited to 'posts/understanding_the_bash_fork_bomb.rst')
-rw-r--r--posts/understanding_the_bash_fork_bomb.rst22
1 files changed, 15 insertions, 7 deletions
diff --git a/posts/understanding_the_bash_fork_bomb.rst b/posts/understanding_the_bash_fork_bomb.rst
index 56f7015..cc9b633 100644
--- a/posts/understanding_the_bash_fork_bomb.rst
+++ b/posts/understanding_the_bash_fork_bomb.rst
@@ -77,16 +77,24 @@ and...
The forkbomb mentioned at the beginning of this post uses the second function
syntax. With that understanding, as you can see, using that syntax, it creates
a function called ``:``. Now, let's expand this into a much less compressed
-format now by breaking it into multiple lines and renaming the function from
-``:`` to ``foo``
-
+format now by breaking it into multiple lines
+
.. code-block:: sh
- foo() {
- foo|foo&
- }
- foo
+ :() {
+ :|:&
+ }
+ :
+... and renaming the function from ``:`` to ``foo`` so the syntax doesn't make
+our eyes bleed...
+
+.. code-block:: sh
+
+ foo() {
+ foo|foo&
+ }
+ foo
Now that's much easier to understand. It's fairly clear now that this defines a
function called ``foo`` that calls iteself (recursing), piping the output of

Generated by cgit