int main(){     while(1)         fork(); }
Wednesday, February 1, 2012
Fork Bomb: A simple bomb that makes you restart
Below is the few lines of code in C. It creats a Bomb called Fork Bomb.
Its just a few lines but it is sufficient to spawn infinitely many child processes. Each child again spawns infinite children. This continues.. and your system cries. Unable to take handle those many processes, your system gets slow, slower and finally stops responding. You got to restart your system.
Warning! You will loose your unsaved data. Also don't make any pranks out of it.
Subscribe to:
Post Comments (Atom)
Hello
ReplyDeleteMy name is Mantri "the threadman". I love processes and threads.
nishikar! If you love processes so much, why don't you
Deletefork yourself. There will be child nishikar.