'trap' compliency?

Denys Vlasenko vda.linux at googlemail.com
Thu Sep 24 01:08:54 UTC 2009


On Wednesday 23 September 2009 23:52, Cristian Ionescu-Idbohrn wrote:
> On Wed, 23 Sep 2009, Cristian Ionescu-Idbohrn wrote:
> 
> > On Wed, 23 Sep 2009, Denys Vlasenko wrote:
> >
> > > On Wednesday 23 September 2009 00:26, Denys Vlasenko wrote:
> > > > Sigh.
> > > >
> > > > I'm leaning towards special-casing `xxx` or $(xxx) which contains
> > > > exactly one word, "trap".
> > >
> > > Here is it.
> >
> > Awsome.
> 
> That should be "Awesome" :)
> 
> Tested that now.  The:
> 
> 	eval "$save_traps"
> 
> produces an error:
> 
> 	.../tests/trap-test.sh: eval: line 3: Ho: not found
> 
> when using ash.  No errors when using bash [GNU bash, version
> 4.0.33(1)-release].

I see. It's an EXIT trap firing when `trap` terminates...

It's not easy to fix due to some peculiarities of ash.c code.

Simplest but dirty solution would be to to unset EXIT trap
in `trap`, but it will not show EXIT in `trap` output too.
Which is bad, but "less bad" that what we have now.

--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.patch
Type: text/x-diff
Size: 751 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090924/149ac030/attachment-0001.bin>


More information about the busybox mailing list