Date: Sun, 16 Feb 2014 20:37:39 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261997 - stable/10/sys/kern Message-ID: <201402162037.s1GKbdnJ032239@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402162037.s1GKbdnJ032239>