[uClibc]RE: [BusyBox] Re: BusyBox `msh' doesn't work correctly with vfork / uClibc

Jonas Holmberg jonas.holmberg at axis.com
Wed Mar 6 01:00:05 UTC 2002


> The grave function is a big mystery to me. I have done some tracing to learn
> which parts of it are vfork-safe but then I gave up. The hack using "execlp"
> works in most cases but is *slow*. The drawback is that any variables in the
> backticks aren't expanded; therefore this won't work,
> 
> DIR="/home"
> RESULT=`ls -l $DIR`

I have a solution for that if you want it. When we "ported" the minix
shell to ETRAX 100 (MMU-less) I solved the variable expansion problem
the hard way (by doing it in grave()). I'm not sure it's the best
solution possible, but it works and it is vfork safe. You can find the
source in the directory axis/devboard/apps/shells/minix-shell in this
tar ball:
<http://developer.axis.com/download/devboard/R1_1_0/devboard-R1_1_0.tgz>. I think it's the same original source code that you used in busybox msh.

/Jonas




More information about the busybox mailing list