Console/terminal mixup with bb-1.13
Denys Vlasenko
vda.linux at googlemail.com
Sun Nov 23 11:29:22 UTC 2008
On Wednesday 12 November 2008 23:14, Harald Küthe wrote:
> The console output / terminal seems to get mixed up, I never noticed this before.
>
> > init started: BusyBox v1.13.0 (2008-11-12 20:52:59 CET
> > Please press Enter to activate th
> > BusyBox v1.13.0 (2008-11-12 20:5#
Second message is printed using rather simple code:
static const char press_enter[] ALIGN1 =
"\nPlease press Enter to activate this console. ";
full_write(STDOUT_FILENO, press_enter, sizeof(press_enter) - 1);
full_write just repeatedly calls write if partial writes
occur, until error, or until all data has been written.
On Saturday 15 November 2008 21:10, Harald Küthe wrote:
> > Does it happen with 1.12.2?
> No.
>
> > If not, does it happen with
> > 1.13.0 if you replace init.c by the one from 1.12.2?
>
> no, init.c from 1.12.2 gives back the old behaviour.
> init started: BusyBox v1.13.0 (2008-11-12 20:52:59
> CET)
> Please press Enter to activate this console.
> BusyBox v1.13.0 (2008-11-12 20:52:59 CET) built-in shell (ash)
> Enter 'help' for a list of built-in commands.
And here it started to work with the same code.
The only think I can think of is this code added in 1.13.0:
/* Make sure init can't be blocked by writing to stderr */
fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) | O_NONBLOCK);
Can you confirm that just removing these lines from 1.13.0
makes it work? If yes, please describe what device
do you use as a console? Is it serial? What speed? Etc...
--
vda
More information about the busybox
mailing list