Bug 1244 testcase

Denis Vlasenko vda.linux at googlemail.com
Mon Mar 5 11:53:28 PST 2007


On Monday 05 March 2007 20:07, Eric Spakman wrote:
> >> But the console is still quiet, I need the cttyhack program to show any
> >>  init bootmessages on the screen.
> >
> > I have an idea what's going on. Your initrd stars /sbin/init this way:
> > ...; exec /sbin/init <dev/console >dev/console 2>dev/console
> > It seems '<' redirection is opened in O_RDONLY mode by shell
> > (both ash and bash).
> >
> >
> > Then init does this:
> >
> >
> > close(1); close(2); set_term(); dup(0); dup(0);
> >
> > Guess what? Our fd #1 and #2 are _not_ writable_ after that!
> > I managed to add statically linked strace into your image
> > and it definitely shows that "/bin/echo TEST" fails to write(1, ...).
> >
> > Please try attached fix.
> >
> The attached patch fixes the problem!

Good. Apllied to svn.
--
vda


More information about the busybox mailing list