kernel - Fix telnet ttyp* allocation
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 23:14:07 +0000 (16:14 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 23:14:07 +0000 (16:14 -0700)
* Fix handling of TS_ZOMBIE, which I think I broke a few commits ago.
  This was preventing traditional pty's from being properly reused.

Reported-by: lentferj
sys/kern/tty_pty.c

index 98cfb42..e14416f 100644 (file)
@@ -398,7 +398,6 @@ ptsopen(struct dev_open_args *ap)
                        return (error);
                }
        }
-       tp->t_state &= ~TS_ZOMBIE;
        error = (*linesw[tp->t_line].l_open)(dev, tp);
        if (error == 0)
                ptcwakeup(tp, FREAD|FWRITE);
@@ -437,7 +436,6 @@ ptsclose(struct dev_close_args *ap)
        err = (*linesw[tp->t_line].l_close)(tp, ap->a_fflag);
        ptsstop(tp, FREAD|FWRITE);
        (void) ttyclose(tp); /* clears t_state */
-       tp->t_state |= TS_ZOMBIE;
 
 #ifdef UNIX98_PTYS
        /*