Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|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

2 Answers 2

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.

share|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

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

share|improve this answer
    
Shouldn't the question be closed then? –  SeanJA Aug 28 '09 at 11:23
    
No: meta.stackexchange.com/questions/4708/… –  innaM Aug 28 '09 at 11:34
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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