[patch] proposed change to busybox option parsing.

Rob Landley rob at landley.net
Mon Sep 5 16:15:20 UTC 2005


On Monday 05 September 2005 03:15, Vladimir N. Oleynik wrote:
> Rob,
>
> > - return (main(argc, argv));
> > + /* I can put this back, but why are we doing it again? */
> > +
> > +// /* Move the command line down a notch */
> > +// /* Preserve pointers so setproctitle() works consistently */
> > +// len = argv[argc] + strlen(argv[argc]) - argv[1];
> > +// memmove(argv[0], argv[1], len);
> > +// memset(argv[0] + len, 0, argv[1] - argv[0]);
> > +//
> > +// /* Fix up the argv pointers */
> > +// len = argv[1] - argv[0];
> > +// memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
> > +// for (i = 0; i < argc; i++)
> > +//  argv[i] -= len;
> >  }
>
> O my God!
> This code is a lot of years as is proved!

Lots of the code I'm cleaning up has sat there since bruce perens' time.  So?

> Well what for you alter not consulting with anybody?

1) Do you want me to _not_ post questions about it to the list?

2) What part of "I can put this back, but why are we doing it again" failed to 
translate?

What's it _for_?  If somebody really deeply wants a "gratuitously mangle 
command line so it doesn't match the command that actually got run, which 
things like python and bash don't do", then fine.  Make it a config option.

But _why_?

Rob



More information about the busybox mailing list