3 ms·
Also: 1) an infinite loop will never use more than one CPU. Because of that, on almost any hardware less than 10 years old, normal users might barely notice an
by Someone 13y ago
Also: 1) an infinite loop will never use more than one CPU. Because of that, on almost any hardware less than 10 years old, normal users might barely notice an infinite loop that doesn't do I/O. A fork bomb, on the other hand, will try and create 2*N processes after N iterations, all of them competing on equal footing with your shell for CPU time and memory.
2) it is fairly easy to kill an infinite loop. Killing the explosion of processes that a fork bomb creates is a different thing. Between the time that you detect the process ID of a process to kill and the time you kill it, that process may have spawned a few new processes.
More info at http://en.wikipedia.org/wiki/Fork_bomb#Defusing http://en.wikipedia.org/wiki/Fork_bomb#Defusing