summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
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 37d0254..673707f 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -309,7 +309,7 @@ exit1(struct thread *td, int rv)
sp->s_ttyvp = NULL;
SESS_UNLOCK(sp);
- if (ttyvp != NULL) {
+ if (ttyvp != NULL && ttyvp->v_type != VBAD) {
/*
* Controlling process.
* Signal foreground pgrp and revoke access to
OpenPOWER on IntegriCloud