Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2007 10:06:41 -0400
From:      Rob <bitabyss@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: defend from -> :() { :&:; } ;:
Message-ID:  <471DFFF1.3010209@gmail.com>
In-Reply-To: <200710222031.58924.mike.jeays@rogers.com>
References:  <123275.56819.qm@web30812.mail.mud.yahoo.com>	<471D00EB.2030903@lazlarlyricon.com> <200710222031.58924.mike.jeays@rogers.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Jeays wrote:
>>> Please do not try to execute this: :() { :&:; } ;: on your BSD machine.
>> What does it do?
> 
> It is easier to understand when you replace the ":" by a more conventional 
> subroutine name.
> 
> myproc () {
>   myproc &
>   myproc
> }
> 
> myproc
> 
> It recursively generates useless processes that clog up the machine. Mine 
> ground to a halt and froze after a few seconds.

Interesting, if not annoying ;)  Thanks for the explanation, Mike.  I edited /etc/login.conf and changed maxproc=unlimited to maxproc=200.  Then tried it.  Took a second or so to start spewing "Cannot fork: Resource temporarily unavailable".  I'd opened a 2nd session, and ps wasn't even able to give me full info on what was happening.  Luckily, is was easily interruptible and the system seemed to recover.

  -Rob




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?471DFFF1.3010209>