summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-05-06 17:07:10 +0000
committerjhb <jhb@FreeBSD.org>2002-05-06 17:07:10 +0000
commit1641885111c6c1913c94955b8df3cce328b45eea (patch)
treea63d72c7b6d451055953aaaa1bcd21008421c222 /sys/kern/kern_exit.c
parentc08f0c732a38ea618b39226298a3288382853456 (diff)
downloadFreeBSD-src-1641885111c6c1913c94955b8df3cce328b45eea.zip
FreeBSD-src-1641885111c6c1913c94955b8df3cce328b45eea.tar.gz
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
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 8718fa0..f23c756 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!");
OpenPOWER on IntegriCloud