1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Purge queues in ttylclose(), if ttywflush() failed

This commit is contained in:
Andrey A. Chernov 1995-02-13 02:18:28 +00:00
parent a3f80a9b22
commit 6d50a4a80f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6336

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
* $Id: tty.c,v 1.22 1995/02/12 23:01:13 ache Exp $
* $Id: tty.c,v 1.23 1995/02/13 02:03:57 ache Exp $
*/
#include <sys/param.h>
@ -1138,10 +1138,8 @@ ttylclose(tp, flag)
int flag;
{
if (flag & IO_NDELAY)
if ((flag & IO_NDELAY) || ttywflush(tp))
ttyflush(tp, FREAD | FWRITE);
else
ttywflush(tp);
return (0);
}