Date: Wed, 31 Jan 2007 14:30:05 -0700 From: "Coleman Kane" <zombyfork@gmail.com> To: "Mike Meyer" <mwm-keyword-freebsdhackers2.e313df@mired.org> Cc: "Dr. Markus Waldeck" <waldeck@gmx.de>, freebsd-hackers@freebsd.org Subject: Re: top delay value Message-ID: <346a80220701311330t389914c7rec2c24ca6df351c9@mail.gmail.com> In-Reply-To: <17856.54032.973691.182086@bhuda.mired.org> References: <200701311442.l0VEgQbA093491@lurza.secnetix.de> <20070131170241.230960@gmx.net> <17856.54032.973691.182086@bhuda.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/31/07, Mike Meyer <mwm-keyword-freebsdhackers2.e313df@mired.org> wrote: > > In <20070131170241.230960@gmx.net>, Dr. Markus Waldeck <waldeck@gmx.de> > typed: > > > > > typing "while :; do :; done". There are a thousand ways > > > > > No. What I write above is not a "fork bomb", it's a single > > > process which is wasting CPU in a busy loop. It's exactly > > > equivalent to top(1) with zero delay, except that top > > > produces some output, while a busy loop does nothing useful > > > at all. > > > > I tested different shells and I found out that an exlicit sub shell > > is required to let the shell fork: > > > > while :; do (:); done > > That's still not a fork bomb. While it creates a process every time > through the loop, the process exits before the loop continues, so > you've still got just a few processes. Basicaly, it's still a busy > loop. > > A true fork bomb creates an ever-increasing number of processes, > typically by forking copies of itself (which led to them being called > "rabbit jobs" when I first ran into one). > > <mike > -- > Mike Meyer <mwm@mired.org> > http://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more information. Don't forget that a real fork bomb would fork forking forkers thereby growing the process overhead and time exponentially! e.g: perl -e 'while(1) { fork; };' -- Coleman Kane
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?346a80220701311330t389914c7rec2c24ca6df351c9>