MSH function support

Denys Vlasenko vda.linux at googlemail.com
Sat Mar 21 20:08:02 UTC 2009


On Saturday 21 March 2009 20:54, Denys Vlasenko wrote:
> On Thursday 19 March 2009 13:07, Mike Frysinger wrote:
> > > > what's the nommu status of hush ?  nommu is the only reason msh lives on.
> > >
> > > hush is working on NOMMU.
> > 
> > you dont happen to know off hand feature parity between the two ?  msh doesnt 
> > support a whole lot, but it'd be annoying if one of those things were missing 
> > in hush.  i'll switch the Blackfin dist to hush after our release (in the 
> > process of freezing/making), so we'll get some testing there ...
> 
> What msh does and hush does not support:
> * here documents
> * (cmd)
> 
> Support for `cmd` in both msh in hush has a bug: if cmd
> produces a long output, say `cat big_file`, both will
> hang. This is because of vfork being used. hush warns
> about it at build time, msh does not.
> 
> The second one I am a bit surprised, I though only (cmd;cmd)
> is not supported, but I just tested and simple (cmd)
> also does not work:
> 
> # ./busybox hush -c "(echo Hi)"
> hush: nested lists are not supported on NOMMU

On the other hand, msh is "supporting" it by basically treating
(cmd) as if it was a { cmd; }

# ./busybox msh -c 'var=1; (var=2); echo $var'
2

I sure can make hush do that, it's trivial, but is that useful?

Since I was fixing bugs in hush, I made some tests, and then
used them to test msh as well. Go to shell/msh_test and run
run-all. You will see that a number of tests (quoting and such)
fail for msh.

--
vda


More information about the busybox mailing list