[busybox]/bin/sh exit status

Denys Vlasenko vda.linux at googlemail.com
Sun Jan 24 22:48:10 UTC 2010


On Sunday 24 January 2010 23:05, Nils Carlson wrote:
> While doing some work with the C system() command we ran into some  
> trouble
> where busybox wasn't returning the exit status of the spawned process,  
> ie,
> 
> /bin/sh -c
> 
> wasn't returning the exit code as from the last command (which it  
> should,
> according to posix).

Give an exact example of the command you run which demonstrates
bad behavior. Like:

$ ./busybox sh -c 'foo bar baz'; echo $?

Also, what is bbox version and .config which you use?

> So here is a simple patch that fixes this, tell me what you think,
> is the change valid, is it desired? It's quite usefull anyway... :-)

The change is invalid. You'd see it if you'd try compiling and
running it.

--
vda


More information about the busybox mailing list