From owner-freebsd-questions@FreeBSD.ORG Wed May 21 17:18:37 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DCBB37B401 for ; Wed, 21 May 2003 17:18:37 -0700 (PDT) Received: from adsl-64-161-78-226.dsl.lsan03.pacbell.net (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id B376D43F85 for ; Wed, 21 May 2003 17:18:36 -0700 (PDT) (envelope-from oremanj@adsl-64-161-78-226.dsl.lsan03.pacbell.net) Received: (qmail 284 invoked by uid 1001); 22 May 2003 00:19:41 -0000 Date: Wed, 21 May 2003 17:19:41 -0700 From: Joshua Oreman To: Aaron Wohl Message-ID: <20030522001941.GD99691@webserver.get-linux.org> References: <20030521123927.34A262EEDF@www.fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030521123927.34A262EEDF@www.fastmail.fm> User-Agent: Mutt/1.4i cc: questions@freebsd.org Subject: Re: crashing fresbsd 5.1-current? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 00:18:37 -0000 On Wed, May 21, 2003 at 06:39:27AM -0600 or thereabouts, Aaron Wohl seemed to write: > How do I crash freebsd? I changed the dump* stuff in /etc/rc.conf. I > want to make sure it works. I looked at man shutdown and man poweroff > but I dont see a crash option. There should be some option to a system > call you need to be root to do that internaly does panic("test crash") ? Yep. man 2 reboot - especially RB_DUMP. It doesn't panic, but it dumps core. Try this: $ cat > crash.c < #include int main() { reboot (RB_DUMP | RB_AUTOBOOT); return 255; } EOF $ gcc -o crash crash.c $ su Password: # ./crash If you were a developer, and wanted to have a little more fun, you could make a KLD that created a /dev/panic device. Then, something like: # echo "I wonder how big a security hole this is..." > /dev/panic would panic with the specified message. See the Developer's Handbook. -- Josh > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"