The following reply was made to PR bin/161739; it has been noted by GNATS. From: Alexander Best <arun...@freebsd.org> To: Jeremy Chadwick <free...@jdc.parodius.com> Cc: freebsd-gnats-sub...@freebsd.org Subject: Re: bin/161739: top -b does not restore ICANON and ECHO terminal capabilities when exiting Date: Mon, 17 Oct 2011 12:08:13 +0000
On Mon Oct 17 11, Jeremy Chadwick wrote: > > >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 > r...@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. i can also confirm this running a very recent HEAD: otaku% stty -a > start; top -b ; stty -a > stop ; diff start stop [...] 2c2 < lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl --- > lflags: -icanon isig iexten -echo echoe echok echoke -echonl echoctl cheers. alex > > 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: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"