FEATURE_PREFER_APPLETS should fail gracefully.

Rob Landley rob at landley.net
Wed Feb 2 06:53:12 UTC 2011


On 02/01/2011 10:19 PM, Denys Vlasenko wrote:
> On Wednesday 02 February 2011 04:34, Rob Landley wrote:
>> On 02/01/2011 08:32 PM, Denys Vlasenko wrote:
>>> On Tuesday 01 February 2011 19:00, Rob Landley wrote:
>>>> When /proc isn't mounted, the /proc/self/exe exec will fail.  In that
>>>> case, busybox should probably just fall back to the normal $PATH
>>>> behavior instead of failing.
>>>
>>> Another option is to patch kernel so that exec("/proc/self/exe")
>>> never fails. See examples/linux-2.6.30_proc_self_exe.patch
>>
>> Magic path bad.  Something like exec(NULL) would be better but it's too
>> close to a common error.  Perhaps exec(".") is a better special case.
> 
> The advantage of magic "/proc/self/exe" path is that *no hacking
> in userspace needed*. Old usersace just works better now.

I'm never patching my kernel with that, and I'd argue to keep it _out_
of the kernel.

Busybox is pretty much the only program that's ever going to care, it's
to work around a flaw in busybox which can be _fixed_, and if you have
enough control of the system that you can patch the kernel you could
also just set up userspace properly, or switch the PREFER config option
of busybox off.

So no, kernel patch bad, in this instance.

Rob


More information about the busybox mailing list