| From | Sent On | Attachments |
|---|---|---|
| Gary Palmer | Jun 2, 1996 7:50 am | |
| Matt Thomas | Jun 2, 1996 10:16 am | |
| Bruce Evans | Jun 2, 1996 1:21 pm | |
| Bruce Evans | Jun 2, 1996 3:33 pm | |
| Matt Thomas | Jun 3, 1996 8:51 am | |
| Terry Lambert | Jun 3, 1996 11:13 am | |
| Bruce Evans | Jun 3, 1996 1:16 pm |
| Subject: | Re: PR conf/1270 | |
|---|---|---|
| From: | Matt Thomas (ma...@lkg.dec.com) | |
| Date: | Jun 3, 1996 8:51:07 am | |
| List: | org.freebsd.freebsd-hackers | |
There is a problem with dangling pointers. See kern_exit.c:
/* * s_ttyp is not zero'd; we use this to indicate * that the session once had a controlling terminal. * (for logging and informational purposes) */
and some things follow the pointer for closed devices. Perhaps only applications like ptstat -t. pstat also wants to work with an array of tty structs.
Digital UNIX had the same misfeature. Which is why it now uses a vnode reference:
struct vnode *s_ttyvp; /* vnode of controlling terminal */
This also allows other things than classic ttys to be controlling terminals (say streams devices or portals or ...).
The same problems interfere with dynamic allocation of tty structs for hardware ttys, but there is less to be gained by dynamic allocation in this case. The closed tty structs are a good place for holding statstics and the state for the next open (they don't actually hold much of it now).
But that doesn't hold true for ptys.
-- Matt Thomas Internet: ma...@3am-software.com 3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html Westford, MA Disclaimer: I disavow all knowledge of this message





