[BusyBox] Patch: sh.c running internal commands

Pavel Roskin proski at gnu.org
Fri Jul 28 15:33:53 UTC 2000


Hello, Erik!

> I actually found that one last night as well (sh.c has been under heavy
> construction -- I now have if-then-else-fi basically working, and I switched
> the parser to using getopt) , but I've been on my laptop so I havn't gotten
> that one into CVS yet.  I'll checkin my work now, and then start integrating
> the rest of yesterdays patches.

Two observations:
1) "busybox sh" crashes

gdb) set args sh
(gdb) run
Starting program: /home/proskin/src/busybox/busybox sh

Program received signal SIGSEGV, Segmentation fault.
0xff4172c in execvp () at execvp.c:52
execvp.c:52: No such file or directory.
(gdb) where
#0  0xff4172c in execvp () at execvp.c:52
#1  0x10021738 in delete_module ()
#2  0x10029734 in swapoff ()
#3  0x10029880 in swapoff ()
#4  0x10029734 in swapoff ()
#5  0xfedf7d4 in __libc_start_main () at
../sysdeps/powerpc/elf/libc-start.c:106
(gdb)

2) Your patch is setting applet_name even if
BB_FEATURE_SH_STANDALONE_SHELL is not defined. I'm not sure it's correct.
Ken's patch was more accurate (although it produced an easy-to-eliminate
warning)

I'll try to elaborate more. It's just a quick message to warn you.

Pavel






More information about the busybox mailing list