*close: just purge tty queues if we can't drain them

This commit is contained in:
ache 1995-02-13 02:09:14 +00:00
parent ee425d9e89
commit 3afc7bbbea
2 changed files with 6 additions and 4 deletions

View File

@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
/* $Id: if_ppp.c,v 1.8 1994/11/26 19:23:59 bde Exp $ */
/* $Id: if_ppp.c,v 1.9 1994/11/27 15:29:56 bde Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
#include "ppp.h"
@ -347,7 +347,8 @@ pppclose(tp, flag)
struct mbuf *m;
int s;
ttywflush(tp);
if (ttywflush(tp))
ttyflush(tp, FREAD | FWRITE);
s = splimp(); /* paranoid; splnet probably ok */
clist_free_cblocks(&tp->t_outq);
tp->t_line = 0;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
* $Id: if_sl.c,v 1.10 1994/11/26 19:24:00 bde Exp $
* $Id: if_sl.c,v 1.11 1994/11/27 15:29:57 bde Exp $
*/
/*
@ -307,7 +307,8 @@ slclose(tp,flag)
register struct sl_softc *sc;
int s;
ttywflush(tp);
if (ttywflush(tp))
ttyflush(tp, FREAD | FWRITE);
/*
* XXX the placement of the following spl is misleading. tty
* interrupts must be blocked across line discipline switches