Typing this :(){:|:&};: will cause system freeze.What is the reason behind this.

link|improve this question

1  
It's called a fork bomb: en.wikipedia.org/wiki/Fork_bomb – Dennis Williamson Aug 28 '09 at 13:09
1  
Why did you make this a comment? – innaM Aug 28 '09 at 14:12
feedback

2 Answers

up vote 6 down vote accepted
:()

defines a function called ':'

{ :|:& };

This is the function: It calls the function itself and pipes the output to the same function ":" and puts the process in the background. (Recursive invocation) with ; it ends the function definition

:

Calls the function and creates havoc.

link|improve this answer
Note that many systems now enforce a limit on processes per user (by default) that protects you from the havoc. Not all systems do, however, so no sense in trying it out. – Telemachus Aug 31 '09 at 12:48
feedback

This was answered on stackoverflow.com. You'll find detailed answers over there.

link|improve this answer
Shouldn't the question be closed then? – SeanJA Aug 28 '09 at 11:23
That wasn't the only time it was asked and answered at SO either: stackoverflow.com/questions/1017440/… – Telemachus Aug 31 '09 at 12:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.