Subject: Re: revoke(2), /dev/console and /dev/ttyE0
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/14/2003 12:26:05
--St7VIuEGZ6dlpu13
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Oct 14, 2003 at 08:35:10AM +0100, David Laight wrote:
> On Mon, Oct 13, 2003 at 03:50:11PM -0700, Bill Studenmund wrote:
>=20
> > What's supposed to happen is that the revoke on one of the nodes will=
=20
> > wander through vgonel(), and then to vclean(, DOCLOSE, ), and eventuall=
y=20
> > to a VOP_CLOSE() call on the underlying device. If that close happens o=
n=20
> > the console device, it will end up closing the underlying device.
>=20
> The VOP_VLOSE() on the underlying device only happens on the last close.
Are you sure of that? Look at spec_close() and remember that when we're in=
=20
vclean(), VXLOCK will be set:
/*
* If the vnode is locked, then we are in the midst
* of forcably closing the device, otherwise we only
* close on last reference.
*/
if (count > 1 && (flags & VXLOCK) =3D=3D 0)
return (0);
So the close should be happening. It could be though that something else=20
needs to take place too.
> If something else has it open, that doesn't happen - so the tty->t_session
> stuff doesn't get zapped.
I think your other note hit this problem on the head. Though I feel a bit=
=20
rusty around some of the tty subsystem, so please have someone else look=20
at it too. :-)
Take care,
Bill
--St7VIuEGZ6dlpu13
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQE/jE3NWz+3JHUci9cRAukvAJ9zJR4CCNkND5eHtlnz+6Aza/P55gCePAdy
uXchOq/ZZsQRAtYz1V6VWMI=
=u9lv
-----END PGP SIGNATURE-----
--St7VIuEGZ6dlpu13--