[svlug] App called during boot, weird backspace behavior
lists at cyclades.com
Wed Nov 14 18:38:02 PST 2001
I have a C application that reads strings typed by the user. Basically, it
does the following:
tostr -> the char vector that will hold the string
maxlen -> the maximum length of the input string
stdin -> standard input file descr.
fgets(tostr, maxlen, stdin);
tostr[strlen(tostr)-1] = '\0';
This app. works fine when called from a shell, but if I run it from one of
the init scripts (_very_ early on, called by the rcS script), I get a
weird behavior on backspace handling / displaying on the screen.
Normally I would get the following (i.e. app run from a regular shell):
In this case, I get the following (i.e. app run from the init script):
The end result (i.e. the string read by the app) is correct, but this
screen output is really confusing to the user!!
I've tried setting the TERM variable to 'linux', 'ansi', 'vt100', hoping
that this was the reason (just because the app is called so early during
the boot process -- yes, it was just a wild guess), but it didn't help.
BTW, this system uses a serial console (no VGA console available).
Does anyone have a clue as to why this is happening and how to fix it?
Thanks in advance for your help!
More information about the svlug