mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-29 06:47:21 +01:00
Don't set TS_ZOMBIE flag for non-open ptys. ptcclose() has always done
too much for non-open ptys, but there is normally no problem because the l_modem(, 0) is a no-op for closed ptys provided the line discipline is standard and MDMBUF isn't set.
This commit is contained in:
parent
bbfd33649d
commit
76107ba3af
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9850
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_pty.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id: tty_pty.c,v 1.15 1995/07/22 16:45:08 bde Exp $
|
||||
* $Id: tty_pty.c,v 1.16 1995/07/31 21:01:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -312,9 +312,11 @@ ptcclose(dev)
|
||||
* sense for ptys. Recover by doing everything that a normal
|
||||
* ttymodem() would have done except for sending a SIGHUP.
|
||||
*/
|
||||
tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
|
||||
tp->t_state |= TS_ZOMBIE;
|
||||
ttyflush(tp, FREAD | FWRITE);
|
||||
if (tp->t_state & TS_ISOPEN) {
|
||||
tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED);
|
||||
tp->t_state |= TS_ZOMBIE;
|
||||
ttyflush(tp, FREAD | FWRITE);
|
||||
}
|
||||
|
||||
tp->t_oproc = 0; /* mark closed */
|
||||
tp->t_session = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user