PATCH: replacing exec*p with BB_EXEC*P

Denis Vlasenko vda.linux at googlemail.com
Sun Feb 4 16:07:33 UTC 2007


On Sunday 04 February 2007 16:01, Bernhard Fischer wrote:
> >OK, will do that. Now, about the specifics: I could simply do what the
> >macro now does, i.e., check for the existance of a busybox applet and
> >then call execvp. Or, I could "unwind" execvp, and check for the
> >presence of a '/' in the program name first, then for the presence of
> >an applet, and last search PATH the way the real execvp does, and end
> >up by calling execve(), the way the real execvp does.
> >
> >Do we want to keep it simple more than we care about speed (avoiding
> >work when the progname contains a '/') ?
> 
> I don't think that spawning a subprogram is _that_ performance critical,

Yes. PATH search is completely dwarfed by fork+exec time anyway
(on current x86 processors and kernels, fork+exec flushes entire
L1 data cache (too many pages copied/zeroed out)).
--
vda



More information about the busybox mailing list