[BusyBox] gets() and backspace

Jim Bauer jfbauer at nfr.com
Thu Feb 3 14:19:44 UTC 2005


On Thursday 03 February 2005 00:14, Mark Beckwith wrote:
> This is probably OT, but I've got nowhere else to turn...
> 
> System: kernel 2.4.25 on an arm at91rm9200
> 
> At the ash prompt, I can type and use backspace just fine.
> 
> If I write an ash script to read user input, or a C program using 
gets(),
> I get the old <H> printed to the screen instead.  My TERM is set to 
vt102.  
> 
> Why does it work fine at the prompt but not in a script?

I suspect if you run 'stty -a' and look at what 'erase' is set to, it'll 
be '^?'.  If so try setting erase to a control-h and see if that fixes 
your problem.

As for why it works find from the ash prompt.  Without looking I presume 
that ash puts the terminal in raw mode and interperting the ^h on its 
own.  While in your script/program the input editing is being handled 
by the tty layer.



More information about the busybox mailing list