Date: Mon, 17 Oct 2011 04:55:34 -0700 (PDT) From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/161739: top -b does not restore ICANON and ECHO terminal capabilities when exiting Message-ID: <20111017115534.EB277102C1C@icarus.home.lan> Resent-Message-ID: <201110171200.p9HC0OJS051262@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111017115534.EB277102C1C>