From owner-freebsd-questions@FreeBSD.ORG Tue Oct 23 14:06:47 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6219F16A41A for ; Tue, 23 Oct 2007 14:06:47 +0000 (UTC) (envelope-from bitabyss@gmail.com) Received: from cartman.xxiii.com (cartman.xxiii.com [208.62.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7A513C4A7 for ; Tue, 23 Oct 2007 14:06:47 +0000 (UTC) (envelope-from bitabyss@gmail.com) Received: from [172.23.23.190] (lan23.xxiii.com [208.62.177.50]) by cartman.xxiii.com (8.13.8/8.13.8) with ESMTP id l9NE6a66046728 for ; Tue, 23 Oct 2007 10:06:36 -0400 (EDT) (envelope-from bitabyss@gmail.com) Message-ID: <471DFFF1.3010209@gmail.com> Date: Tue, 23 Oct 2007 10:06:41 -0400 From: Rob User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: FreeBSD Questions References: <123275.56819.qm@web30812.mail.mud.yahoo.com> <471D00EB.2030903@lazlarlyricon.com> <200710222031.58924.mike.jeays@rogers.com> In-Reply-To: <200710222031.58924.mike.jeays@rogers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: defend from -> :() { :&:; } ;: X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2007 14:06:47 -0000 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