xref: /freebsd/share/man/man9/panic.9 (revision d46ebd58202b2bf0f4bc3a27d6366f73360a6cd6)
1d46ebd58SMike Pritchard.\"     $NetBSD: panic.9,v 1.2 1996/10/09 17:20:04 explorer Exp $
2d46ebd58SMike Pritchard.\"
3d46ebd58SMike Pritchard.\" Copyright (c) 1996 Michael Graff.
4d46ebd58SMike Pritchard.\" All rights reserved.
5d46ebd58SMike Pritchard.\"
6d46ebd58SMike Pritchard.\" Redistribution and use in source and binary forms, with or without
7d46ebd58SMike Pritchard.\" modification, are permitted provided that the following conditions
8d46ebd58SMike Pritchard.\" are met:
9d46ebd58SMike Pritchard.\" 1. Redistributions of source code must retain the above copyright
10d46ebd58SMike Pritchard.\"    notice, this list of conditions and the following disclaimer.
11d46ebd58SMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright
12d46ebd58SMike Pritchard.\"    notice, this list of conditions and the following disclaimer in the
13d46ebd58SMike Pritchard.\"    documentation and/or other materials provided with the distribution.
14d46ebd58SMike Pritchard.\" 3. All advertising materials mentioning features or use of this software
15d46ebd58SMike Pritchard.\"    must display the following acknowledgement:
16d46ebd58SMike Pritchard.\"      This product includes software developed by Michael Graff
17d46ebd58SMike Pritchard.\"      for the NetBSD Project.
18d46ebd58SMike Pritchard.\" 3. The name of the author may not be used to endorse or promote products
19d46ebd58SMike Pritchard.\"    derived from this software without specific prior written permission
20d46ebd58SMike Pritchard.\"
21d46ebd58SMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22d46ebd58SMike Pritchard.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23d46ebd58SMike Pritchard.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24d46ebd58SMike Pritchard.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25d46ebd58SMike Pritchard.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26d46ebd58SMike Pritchard.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27d46ebd58SMike Pritchard.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28d46ebd58SMike Pritchard.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29d46ebd58SMike Pritchard.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30d46ebd58SMike Pritchard.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31d46ebd58SMike Pritchard.\"
32d46ebd58SMike Pritchard.Dd August 11, 1995
33d46ebd58SMike Pritchard.Dt PANIC 9
34d46ebd58SMike Pritchard.Os
35d46ebd58SMike Pritchard.Sh NAME
36d46ebd58SMike Pritchard.Nm panic
37d46ebd58SMike Pritchard.Nd Bring down system on fatal error
38d46ebd58SMike Pritchard.Sh SYNOPSIS
39d46ebd58SMike Pritchard.Fd #include <sys/types.h>
40d46ebd58SMike Pritchard.Fd #include <sys/systm.h>
41d46ebd58SMike Pritchard.Ft void
42d46ebd58SMike Pritchard.Fn panic "const char *fmt, ..."
43d46ebd58SMike Pritchard.Sh DESCRIPTION
44d46ebd58SMike PritchardThe
45d46ebd58SMike Pritchard.Fn panic
46d46ebd58SMike Pritchardfunction terminates the running system.  The message
47d46ebd58SMike Pritchard.Fa fmt
48d46ebd58SMike Pritchardis a
49d46ebd58SMike Pritchard.Xr printf 3
50d46ebd58SMike Pritchardstyle format string.  The message is printed to the console and the location
51d46ebd58SMike Pritchard.Fa panicstr
52d46ebd58SMike Pritchardis set to the address of the message text for retrieval from the OS
53d46ebd58SMike Pritchardcore dump.
54d46ebd58SMike Pritchard.Pp
55d46ebd58SMike PritchardIf the kernel debugger is installed control is passed to it, otherwise
56d46ebd58SMike Pritchardan attempt to save a core dump of the OS to a configured dump device
57d46ebd58SMike Pritchardis made.
58d46ebd58SMike Pritchard.Pp
59d46ebd58SMike PritchardIf
60d46ebd58SMike Pritchard.Fn panic
61d46ebd58SMike Pritchardis called twice (from the disk sync routines, for example) the system is
62d46ebd58SMike Pritchardrebooted without syncing the disks.
63d46ebd58SMike Pritchard.Sh RETURN VALUES
64d46ebd58SMike PritchardThe
65d46ebd58SMike Pritchard.Fn panic
66d46ebd58SMike Pritchardfunction does not return.
67