Subject: Re: ptys are not always freed
To: None <current-users@NetBSD.ORG>
From: Onno van der Linden <onno@simplex.nl>
List: current-users
Date: 01/20/1998 06:48:00
[ Todd Vierling says that pty's aren't always freed and comes up with a
  scenario using screen 3.7.2, Matthew Jacob replies ]
> Tried this on NetBSD-1.3. (1.3A from about 3 weeks back to be
> accurate) on an alpha.
> 
> 0. run screen.
> 1. create a second window (so the kill doesn't delete the last window)
> 2. tty (ttyp3 for me)
> 3. emacs
> 4. ^xk (kills window 1).
> 5. ^xc (create a new window). No ghost image.
> 6.  tty tells me this is ttyp3 again.
> Sorry- I can't reproduce you're thingie.

This is an old bug that, AFAIK, only exists on NetBSD/i386 when you use
PCVT (and the bebox port that uses PCVT ?) It does *NOT* come up when you use
pccons.

Here's my scenario (With 1.3B/i386 and PCVT, should also work for earlier
versions).

0. ps x | awk '{ print $2}' | sort -u
   TT
   v0
1. /usr/bin/window
1. ^pqy (Ctrl-P displays the command mode, q quits en y confirms)
2. ps x | awk '{ print $2}' | sort -u
   TT
   p0    <----
   p1    <----
   v0
3. /usr/bin/window
   Error messages in both windows about not having job control which
   are caused by the pty's that aren't freed.

Onno