From owner-svn-src-all@FreeBSD.ORG Tue Oct 21 14:18:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03E651065670; Tue, 21 Oct 2008 14:18:46 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E713C8FC27; Tue, 21 Oct 2008 14:18:45 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9LEIjB7001165; Tue, 21 Oct 2008 14:18:45 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9LEIjVF001164; Tue, 21 Oct 2008 14:18:45 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200810211418.m9LEIjVF001164@svn.freebsd.org> From: Andrew Thompson Date: Tue, 21 Oct 2008 14:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184127 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 14:18:46 -0000 Author: thompsa Date: Tue Oct 21 14:18:45 2008 New Revision: 184127 URL: http://svn.freebsd.org/changeset/base/184127 Log: If we have getc_inject hooked then the outq buffer is inaccessible to the driver so skip the drain rather than waiting indefinitely. Reviewed by: ed Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Tue Oct 21 14:11:00 2008 (r184126) +++ head/sys/kern/tty.c Tue Oct 21 14:18:45 2008 (r184127) @@ -119,6 +119,10 @@ tty_drain(struct tty *tp) { int error; + if (ttyhook_hashook(tp, getc_inject)) + /* buffer is inaccessable */ + return (0); + while (ttyoutq_bytesused(&tp->t_outq) > 0) { ttydevsw_outwakeup(tp); /* Could be handled synchronously. */