bin/161739: top -b does not restore ICANON and ECHO terminal
capabilities when exiting
Jeremy Chadwick
freebsd at jdc.parodius.com
Mon Oct 17 12:00:26 UTC 2011
>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 at 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:
More information about the freebsd-bugs
mailing list