From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 17 12:00:26 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBF0106567B for ; Mon, 17 Oct 2011 12:00:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9E31B8FC19 for ; Mon, 17 Oct 2011 12:00:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HC0ONr051263 for ; Mon, 17 Oct 2011 12:00:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9HC0OJS051262; Mon, 17 Oct 2011 12:00:24 GMT (envelope-from gnats) Resent-Date: Mon, 17 Oct 2011 12:00:24 GMT Resent-Message-Id: <201110171200.p9HC0OJS051262@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Chadwick Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69900106564A for ; Mon, 17 Oct 2011 11:55:36 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 54D908FC0A for ; Mon, 17 Oct 2011 11:55:36 +0000 (UTC) Received: from omta23.emeryville.ca.mail.comcast.net ([76.96.30.90]) by qmta09.emeryville.ca.mail.comcast.net with comcast id lnvV1h0011wfjNsA9nvV7R; Mon, 17 Oct 2011 11:55:29 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta23.emeryville.ca.mail.comcast.net with comcast id lnu51h00V1t3BNj8jnu5kB; Mon, 17 Oct 2011 11:54:05 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id EB277102C1C; Mon, 17 Oct 2011 04:55:34 -0700 (PDT) Message-Id: <20111017115534.EB277102C1C@icarus.home.lan> Date: Mon, 17 Oct 2011 04:55:34 -0700 (PDT) From: Jeremy Chadwick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/161739: top -b does not restore ICANON and ECHO terminal capabilities when exiting X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Chadwick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 12:00:26 -0000 >Number: 161739 >Category: bin >Synopsis: top -b does not restore ICANON and ECHO terminal capabilities when exiting >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 17 12:00:24 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD icarus.home.lan 8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Sep 28 05:02:05 PDT 2011 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64 >Description: It appears that "top -b" results in top disabling ICANON and ECHO the controlling terminal/tty, but upon exit never re-enables them. I can confirm this problem on RELENG_7 (7.4-STABLE) and RELENG_8 (8.2-STABLE). "top -b" does not work on RELENG_6. stty -a after running top -b shows "-icanon" and "-echo", which confirms the bug. I have not looked at the top code to find out where the bug is, but I do see calls which adjust ICANON and ECHO capabilities on the tty, so it's definitely there. >How-To-Repeat: 1. Run top -b 2. Attempt to type something into your shell or make use of an app which relies on canonical input. >Fix: Manually typing "stty echo icanon" after using top -b will restore proper bits on the tty. >Release-Note: >Audit-Trail: >Unformatted: