From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 31 17:33:30 2007 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AB4A16A400 for ; Wed, 31 Jan 2007 17:33:30 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 8B4D313C4A3 for ; Wed, 31 Jan 2007 17:33:29 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 17643 invoked by uid 1001); 31 Jan 2007 17:34:09 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Wed, 31 Jan 2007 12:34:09 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17856.54032.973691.182086@bhuda.mired.org> Date: Wed, 31 Jan 2007 12:34:08 -0500 To: "Dr. Markus Waldeck" In-Reply-To: <20070131170241.230960@gmx.net> References: <200701311442.l0VEgQbA093491@lurza.secnetix.de> <20070131170241.230960@gmx.net> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: top delay value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 17:33:30 -0000 In <20070131170241.230960@gmx.net>, Dr. Markus Waldeck 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). http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.