svn commit: r261997 - stable/10/sys/kern

Marcel Moolenaar marcel at FreeBSD.org
Sun Feb 16 20:37:40 UTC 2014


Author: marcel
Date: Sun Feb 16 20:37:39 2014
New Revision: 261997
URL: http://svnweb.freebsd.org/changeset/base/261997

Log:
  MFC r259441:
  Properly drain the TTY when both revoke(2) and close(2) end up closing
  the TTY.

Modified:
  stable/10/sys/kern/tty.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/tty.c
==============================================================================
--- stable/10/sys/kern/tty.c	Sun Feb 16 20:26:22 2014	(r261996)
+++ stable/10/sys/kern/tty.c	Sun Feb 16 20:37:39 2014	(r261997)
@@ -191,8 +191,10 @@ ttydev_leave(struct tty *tp)
 
 	/* Drain any output. */
 	MPASS((tp->t_flags & TF_STOPPED) == 0);
-	if (!tty_gone(tp))
-		tty_drain(tp);
+	if (!tty_gone(tp)) {
+		while (tty_drain(tp) == ERESTART)
+			;
+	}
 
 	ttydisc_close(tp);
 


More information about the svn-src-stable-10 mailing list