xref: /openbsd-src/share/man/man9/panic.9 (revision f7780170a7fd15acb26fda7ccb5417b70da1f666)
1*f7780170Sderaadt.\"	$OpenBSD: panic.9,v 1.10 2021/05/16 15:11:08 deraadt Exp $
27188c0e0Skstailey.\"     $NetBSD: panic.9,v 1.2 1996/10/09 17:20:04 explorer Exp $
37188c0e0Skstailey.\"
47188c0e0Skstailey.\" Copyright (c) 1996 Michael Graff.
57188c0e0Skstailey.\" All rights reserved.
67188c0e0Skstailey.\"
77188c0e0Skstailey.\" Redistribution and use in source and binary forms, with or without
87188c0e0Skstailey.\" modification, are permitted provided that the following conditions
97188c0e0Skstailey.\" are met:
107188c0e0Skstailey.\" 1. Redistributions of source code must retain the above copyright
117188c0e0Skstailey.\"    notice, this list of conditions and the following disclaimer.
127188c0e0Skstailey.\" 2. Redistributions in binary form must reproduce the above copyright
137188c0e0Skstailey.\"    notice, this list of conditions and the following disclaimer in the
147188c0e0Skstailey.\"    documentation and/or other materials provided with the distribution.
157188c0e0Skstailey.\" 3. All advertising materials mentioning features or use of this software
167188c0e0Skstailey.\"    must display the following acknowledgement:
177188c0e0Skstailey.\"      This product includes software developed by Michael Graff
187188c0e0Skstailey.\"      for the NetBSD Project.
197188c0e0Skstailey.\" 3. The name of the author may not be used to endorse or promote products
207188c0e0Skstailey.\"    derived from this software without specific prior written permission
217188c0e0Skstailey.\"
227188c0e0Skstailey.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
237188c0e0Skstailey.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
247188c0e0Skstailey.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
257188c0e0Skstailey.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
267188c0e0Skstailey.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
277188c0e0Skstailey.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
287188c0e0Skstailey.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
297188c0e0Skstailey.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
307188c0e0Skstailey.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
317188c0e0Skstailey.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
327188c0e0Skstailey.\"
33*f7780170Sderaadt.Dd $Mdocdate: May 16 2021 $
347188c0e0Skstailey.Dt PANIC 9
357188c0e0Skstailey.Os
367188c0e0Skstailey.Sh NAME
377188c0e0Skstailey.Nm panic
387188c0e0Skstailey.Nd Bring down system on fatal error
397188c0e0Skstailey.Sh SYNOPSIS
40dddd2645Sschwarze.In sys/types.h
41dddd2645Sschwarze.In sys/systm.h
427188c0e0Skstailey.Ft void
43e82db24dSschwarze.Fn panic "const char *fmt" ...
447188c0e0Skstailey.Sh DESCRIPTION
457188c0e0SkstaileyThe
467188c0e0Skstailey.Fn panic
47ab967380Saaronfunction makes the
48ab967380Saaron.Ox
49ab967380Saaronsystem terminate.
50ab967380SaaronThe message
517188c0e0Skstailey.Fa fmt
527188c0e0Skstaileyis a
538b3caad3Sespie.Xr printf 9
54ab967380Saaronstyle format string.
55*f7780170SderaadtThe message is printed to the console (with a newline) and the location
567188c0e0Skstaileypointed to by the global char pointer
577188c0e0Skstailey.Fa panicstr
5825d52a34Sespieis set to the address of the message text for retrieval from the OS
597188c0e0Skstaileycore dump.
607188c0e0Skstailey.Pp
61f167ca35SjcsIf the kernel debugger is installed, control is passed to it.
62f167ca35SjcsOtherwise, an attempt is made to save a core dump of the OS to a configured
63f167ca35Sjcsdump device.
647188c0e0Skstailey.Pp
657188c0e0SkstaileyIf
667188c0e0Skstailey.Fn panic
677188c0e0Skstaileyis called twice (from the disk sync routines, for example) the system is
687188c0e0Skstaileyrebooted without syncing the disks.
697188c0e0Skstailey.Sh RETURN VALUES
707188c0e0SkstaileyThe
717188c0e0Skstailey.Fn panic
727188c0e0Skstaileyfunction does not return.
738b3caad3Sespie.Sh SEE ALSO
748b3caad3Sespie.Xr printf 3 ,
758b3caad3Sespie.Xr boot 9 ,
768b3caad3Sespie.Xr printf 9
77