[BusyBox] overriding builtins
Larry Doolittle
ldoolitt at recycle.lbl.gov
Fri Nov 17 00:35:30 UTC 2000
On Thu, Nov 16, 2000 at 05:24:32PM -0700, Erik Andersen wrote:
> >
> > For the case where a "/" exists in argv[0], it might
> > even be interesting to stat() argv[0], and compare it
> > with our own inode, as the _only_ test. It might be
> > an interesting exercise to portably and reliably find
> > our own inode.
> > therefore be accepted), I will proceed.
>
> I'd be ok with having it first stat for an external app and use that if it
> exists, otherwise default to the builtin. I think that would be nice -- nicer
> then something like having to prepend a "-" or some-such to get the builtin..
Any ideas on what to do with the results of stat()?
Should I see if it's a symlink to busybox, or try to
compare inode numbers? If the latter, how do I find
out the inode for myself? Or should _any_ file force
a real exec, and only non-existent filenames get run
as applets, in which case default install should peek
at BB_FEATURE_SH_STANDALONE_SHELL, and if it's set
should _not_ make symlinks all over the place.
Anything we change will make someone unhappy :-( .
Maybe there could be a magic path element that means
"check for an applet". That would mean hacking exec,
probably not what people expect. I start to think that
_any_ argv[0] with /'s in it should force a real exec,
even if that takes us right back to busybox.
- Larry
More information about the busybox
mailing list