On 03-Nov-04 Daniel Silverstone wrote:
On Wed, 2004-11-03 at 22:47 +0100, Wayne Stallwood wrote:
When typed into a bash prompt :(){ :|:&};: I have been told it does bad things so don't try it, is it folklore or does it really do something nasty ?
It's a fork bomb.. read fully it is:
define function called ':' as being the result of calling ':' piped through ':' put into the background. Then call the function ':'
Rapidly spirals into doom.
A common alternative you see floating around is:
_(){_&_}_
Another subtle bomb is
cat < /dev/tty0
If you don't like what happens, you can try killing it from another console.
This one is relatively less disastrous, in that it is possible to close it down. Just how, is left as an exercise for the reader[1].
Best wishes to all, Ted.
[1] Hint: X
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 [NB: New number!] Date: 04-Nov-04 Time: 09:32:09 ------------------------------ XFMail ------------------------------