There is a problem with dangling pointers. See kern_exit.c:
* s_ttyp is not zero'd; we use this to indicate
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 ...).
FreeBSD already has s_ttyvp, but still needs s_ttyp.