[Bug 201167] units(1) corrupts terminal when run via $()

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jun 28 11:59:35 UTC 2015


            Bug ID: 201167
           Summary: units(1) corrupts terminal when run via $()
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: jmmv at FreeBSD.org

Consider this from today's current:

$ units -t ft in
$ echo "$(units -t ft in)"                                                      

When running 'units' from within $(), the terminal becomes unusable; note the
staircas effect after the second invocation.  Carriage returns do not work any
longer, nor do control characters such as Ctrl+D.  "reset" fixes the carriage
return issue, but not everything: for example, backspace cannot work any

I have tried this from both the "physical console" (in VMware), a remote
session from OS X's Terminal.app, and from within tmux from such remote
session.  (Do not try on the physical console; getty gets confused once you log

I somehow doubt this is a units(1) issue and suspect the problem is coming from
libedit, but I'm filing this as a units(1) issue because that's how the problem
can be reproduced.

(As a related issue, "units -t" should not need to initialize libedit at all --
but it's doing it.  Removing that code path "hides" the problem.)

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list