From e746d950abcdc71b2c2ed11499ee86c48d0e1bcd Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 6 May 2002 17:07:10 +0000 Subject: [PATCH] When checking to see if the init process calls exit1(), compare p to the initproc proc pointer instead of checking to see if the pid is 1. Submitted by: bde --- sys/kern/kern_exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 8718fa022af..f23c7562747 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -133,7 +133,7 @@ exit1(td, rv) GIANT_REQUIRED; p = td->td_proc; - if (p->p_pid == 1) { + if (p == initproc) { printf("init died (signal %d, exit %d)\n", WTERMSIG(rv), WEXITSTATUS(rv)); panic("Going nowhere without my init!");