Date: Wed, 21 May 2003 17:19:41 -0700 From: Joshua Oreman <oremanj@webserver.get-linux.org> To: Aaron Wohl <freebsd@soith.com> Cc: questions@freebsd.org Subject: Re: crashing fresbsd 5.1-current? Message-ID: <20030522001941.GD99691@webserver.get-linux.org> In-Reply-To: <20030521123927.34A262EEDF@www.fastmail.fm> References: <20030521123927.34A262EEDF@www.fastmail.fm>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <<EOF #include <unistd.h> #include <sys/reboot.h> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030522001941.GD99691>