unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Page:
Section:
Apropos / Subsearch:
optional field

PANIC(9)                 BSD Kernel Developer's Manual                PANIC(9)

NAME
     panic -- Bring down system on fatal error

SYNOPSIS
     #include <&lt;sys/types.h>&gt;
     #include <&lt;sys/systm.h>&gt;

     void
     panic(const char *fmt, ...);

DESCRIPTION
     The panic() function terminates the NetBSD system.  The message fmt is a
     printf(3) style format string which is printed to the console and saved
     in the variable panicstr for later retrieval via core dump inspection.  A
     newline character is added at the end automatically, and is thus not
     needed in the format string.

     If a kernel debugger is installed, control is passed to it after the mes-
     sage is printed.  If the kernel debugger is ddb(4), control is only
     passed if the value of the ddb.onpanic sysctl(3) is ``1'', otherwise, a
     ddb(4)-specific function is used to print the kernel stack trace, and
     then control returns to panic().

     If control remains in panic(), an attempt is made to save an image of
     system memory on the configured dump device.

     If during the process of handling the panic, panic() is called again
     (from the filesystem synchronization routines, for example), the system
     is rebooted immediately without synchronizing any filesystems.

RETURN VALUES
     The panic() function does not return.

SEE ALSO
     sysctl(3), ddb(4), ipkdb(4), options(4), savecore(8), swapctl(8),
     sysctl(8)

BSD                           September 27, 2002                           BSD