Consider the canonical example of a Unix fork bomb:
DANGER: running the following command, might crash your system.
:(){ :|: & };:
I wonder why &
(background) is needed in order to use up all of the system's resources - after all the function :
is recursive? Also, I have attempted to execute :
without &
, but in this case Bash doesn't accept the syntax, why?
&
is to make the fork bomb run faster? At least that's what I understand from your answer :) – Shuzheng Dec 10 '19 at 09:06