Extentd David's recent change to shutdown_nice() by calling

cpu_reset() directly in case init(8) is *not* running.
This commit is contained in:
Joerg Wunsch 1995-08-06 19:45:34 +00:00
parent b21c8dbe0e
commit 352abcd4a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9976

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_xxx.c 8.2 (Berkeley) 11/14/93
* $Id: kern_xxx.c,v 1.10 1995/05/30 08:05:49 rgrimes Exp $
* $Id: kern_xxx.c,v 1.11 1995/07/30 17:10:36 davidg Exp $
*/
#include <sys/param.h>
@ -43,6 +43,7 @@
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include <sys/signalvar.h>
#include <machine/md_var.h>
/* This implements a "TEXT_SET" for cleanup functions */
@ -171,6 +172,9 @@ shutdown_nice(void)
/* Send a signal to init(8) and have it shutdown the world */
if (initproc != NULL)
psignal(initproc, SIGINT);
else
/* No init(8) running, simply reset the CPU */
cpu_reset();
return;
}