From 14a4b83067a3c8f3a746a4a7c2aeea26709b3d77 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Thu, 29 May 1997 13:29:13 +0000 Subject: [PATCH] Don't remove the controlling tty from the session if the vnode is being cleaned. This should help for PR kern/3581. --- sys/fs/specfs/spec_vnops.c | 3 ++- sys/miscfs/specfs/spec_vnops.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 7a346f63db4e..b98fcedaea03 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.38 1997/03/24 11:24:44 bde Exp $ + * $Id: spec_vnops.c,v 1.39 1997/05/01 19:12:22 sos Exp $ */ #include @@ -595,6 +595,7 @@ spec_close(ap) * plus the session), release the reference from the session. */ if (vcount(vp) == 2 && ap->a_p && + (vp->v_flag & VXLOCK) == 0 && vp == ap->a_p->p_session->s_ttyvp) { vrele(vp); ap->a_p->p_session->s_ttyvp = NULL; diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 7a346f63db4e..b98fcedaea03 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.38 1997/03/24 11:24:44 bde Exp $ + * $Id: spec_vnops.c,v 1.39 1997/05/01 19:12:22 sos Exp $ */ #include @@ -595,6 +595,7 @@ spec_close(ap) * plus the session), release the reference from the session. */ if (vcount(vp) == 2 && ap->a_p && + (vp->v_flag & VXLOCK) == 0 && vp == ap->a_p->p_session->s_ttyvp) { vrele(vp); ap->a_p->p_session->s_ttyvp = NULL;