From owner-freebsd-hackers Mon Jun 3 13:17:27 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA14812 for hackers-outgoing; Mon, 3 Jun 1996 13:17:27 -0700 (PDT) Received: from mail13.digital.com (mail13.digital.com [192.208.46.30]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA14787 for ; Mon, 3 Jun 1996 13:17:17 -0700 (PDT) Received: from muggsy.lkg.dec.com by mail13.digital.com (8.7.5/UNX 1.2/1.0/WV) id PAA22011; Mon, 3 Jun 1996 15:47:02 -0400 (EDT) Received: from whydos.lkg.dec.com by muggsy.lkg.dec.com (5.65/DEC-Ultrix/4.3) with SMTP id AA29809; Mon, 3 Jun 1996 15:46:30 -0400 Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.12/8.6.12) with SMTP id PAA25025; Mon, 3 Jun 1996 15:51:27 GMT Message-Id: <199606031551.PAA25025@whydos.lkg.dec.com> X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 To: Bruce Evans Cc: hackers@freebsd.org Subject: Re: PR conf/1270 In-Reply-To: Your message of "Mon, 03 Jun 1996 08:33:50 +1000." <199606022233.IAA09273@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 03 Jun 1996 15:51:27 +0000 From: Matt Thomas Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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: matt@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