On Friday 30 May 2008 12:25, Cristian Ionescu-Idbohrn wrote:
> On Fri, 30 May 2008, Bernhard Fischer wrote:
> 
> > On Thu, May 29, 2008 at 11:53:03PM +0200, Cristian Ionescu-Idbohrn wrote:
> > >@@ -8540,6 +8541,9 @@
> > >   { BUILTIN_NOSPEC        "let", letcmd },
> > > #endif
> > >   { BUILTIN_ASSIGN        "local", localcmd },
> > >+#if ENABLE_ASH_BUILTIN_PRINTF
> > >+  { BUILTIN_REGULAR               "[", printfcmd },
> > >+#endif
> >
> > are you sure that "[" is correct here?
> 
> Of course it isn't.  And that possibly has something to do with the
> odd behaviour I experienced:
> 
> | On the negative side, the above command line outputs all 100000
> | lines to stdout, even if I redirect to /dev/null
> 
> > Sounds a bit like it should be "printf", but i didn't look..
> 
> Of course it should.

This one does not seem right too:

-USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+USE_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, 
printf))

                case '\\':
                        if (*++f == 'c')
                                exit(EXIT_SUCCESS);

You cannot exit from NOFORK applet!

Also, please take a look into echo.c, specifically
"We must check that stdout is not closed" comment.
You need to do the same in printf.c if you want it to be
an ash builtin or NOFORK.

As for alloc, I just eliminated it completely - see current svn.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to