Subject: revoke(2), /dev/console and /dev/ttyE0
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 10/13/2003 18:41:48
I've found a 'little' problem with the way revoke interacts with the console.
Under some circumstances, not all the users of the underlying tty
go away, which leaves the session attached to the tty.
This stops the next getty from creating the controlling terminal - leaving
a tty session with no stdout or stderr!

The problem is that the console relies on the tty structure of the
underlying terminal device.  When a revoke is done on the console, the
underlying tty isn't affected, similarly a revoke on the underlying
terminal won't affect the console.

So on an i386 system where the console tty is /dev/ttyE0 if anything
opens /dev/ttyE0 (and nothing will stop it) then it will stop getty
on /dev/console from working properly.

I can't see anyway to fix this without putting knowlege of the
console into genfs_revoke.

The effects of the TIOCCONS ioctl don't bear thinking about.

	David

-- 
David Laight: david@l8s.co.uk