kern_shutdown.c (72358) | kern_shutdown.c (73913) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/sys/kern/kern_shutdown.c 72358 2001-02-11 10:44:09Z markm $ | 39 * $FreeBSD: head/sys/kern/kern_shutdown.c 73913 2001-03-07 02:50:09Z jhb $ |
40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 104 unchanged lines hidden (view full) --- 152 153void 154shutdown_nice(int howto) 155{ 156 shutdown_howto = howto; 157 158 /* Send a signal to init(8) and have it shutdown the world */ 159 if (initproc != NULL) { | 40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 104 unchanged lines hidden (view full) --- 152 153void 154shutdown_nice(int howto) 155{ 156 shutdown_howto = howto; 157 158 /* Send a signal to init(8) and have it shutdown the world */ 159 if (initproc != NULL) { |
160 PROC_LOCK(initproc); |
|
160 psignal(initproc, SIGINT); | 161 psignal(initproc, SIGINT); |
162 PROC_UNLOCK(initproc); |
|
161 } else { 162 /* No init(8) running, so simply reboot */ 163 boot(RB_NOSYNC); 164 } 165 return; 166} 167static int waittime = -1; 168static struct pcb dumppcb; --- 452 unchanged lines hidden --- | 163 } else { 164 /* No init(8) running, so simply reboot */ 165 boot(RB_NOSYNC); 166 } 167 return; 168} 169static int waittime = -1; 170static struct pcb dumppcb; --- 452 unchanged lines hidden --- |