stty echo in ash
Rich Felker
dalias at aerifal.cx
Tue Aug 1 15:07:46 UTC 2006
On Tue, Aug 01, 2006 at 08:16:48AM -0400, Paul Fox wrote:
> rob wrote:
> > On Monday 31 July 2006 7:19 pm, David Byron wrote:
> > > On Monday 31 July 2006 11:49 am, Rob Landley wrote:
> > > I grabbed the head of the source tree, configured and built it.
> > >
> > > On my target, when I execute
> > >
> > > ~ # stty raw -echo -ctlecho && nc -f /dev/ttyS0
> > >
> > > what I type is still echoed to the screen, but when I hit enter I get a
> > > carriage return, no newline and no output, as though what I type isn't being
> > > treated as a command. When I hit ctrl-c, I see a dot (.). The way I got
> > > the shell back was to telnet in and kill it.
> >
> > What are you talking to at the far end?
> >
> > Yeah, you have to kill it from another console. Netcat doesn't parse escape
> > sequences.
> >
> > > Feels like I'm missing something obvious.
> >
> > Sounds like your shell is undoing what stty does. Which shell are you using?
>
> i missed the start of this thread, but the subject says he's using ash.
>
> ash certainly plays with those tty settings, if command editing is
> configured. but it saves and restores what's there, and cmdedit_read_input()
> shouldn't be called in the middle of this:
> # stty raw -echo -ctlecho && nc -f /dev/ttyS0
> in any case. so i think it should work as rob says.
>
> that said, strace is probably your friend, if you have a working
> copy for your platform.
If I understood correctly, he was trying to get "expect" to control
his shell remotely, and the echoing from the command line editing was
getting in the way. Using expect to control a shell sounds dubious,
but oh well..
Rich
More information about the busybox
mailing list