crashing fresbsd 5.1-current?
oremanj at webserver.get-linux.org
Wed May 21 17:18:37 PDT 2003
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.
$ cat > crash.c <<EOF
reboot (RB_DUMP | RB_AUTOBOOT);
$ gcc -o crash crash.c
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
# echo "I wonder how big a security hole this is..." > /dev/panic
would panic with the specified message. See the Developer's Handbook.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions