Re: [PATCH] clear_traps: reset savestatus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Harald van Dijk <harald@xxxxxxxxxxx> wrote:
>
> I had intended it as a testcase for dash with your change applied, in 
> which case it fails even without making sure of that since you hit 
> _exit(savestatus) with savestatus reset to -1, but I like that it's so 
> easy to modify to also fail on unpatched dash, so thanks for that.
> 
> By the way, my change has an unintended but possibly acceptable side effect:
> 
>   trap '(trap "echo exit" EXIT; :)' EXIT
> 
> This prints nothing with current dash, but prints "exit" with my change. 
> It also prints "exit" in ksh, mksh, posh, and bosh.

I'm happy to allow exit traps to be processed here.  But we should
be able to achieve the same result without jumping back to main,
by simply jumping back to the start of exitshell instead.

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux