PATCH: replacing exec*p with BB_EXEC*P

Bernhard Fischer rep.dot.nop at gmail.com
Sun Feb 4 15:01:57 UTC 2007


On Sun, Feb 04, 2007 at 08:47:37AM -0500, Gabriel L. Somlo wrote:
>On Sun, Feb 04, 2007 at 11:28:53AM +0100, Bernhard Fischer wrote:
>> >Twenty one callsites. Maybe BB_EXECVP should call bb_execvp()
>> >(which should be a function) to save space?
>> 
>> Yes, please put it into an bb_execvp
>
>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,
so i'd go for the simple case of looking if we've got an applet (like
the macro did) only. Also, i'd expect this to me smaller, which is the
ultimate reason there.



More information about the busybox mailing list