Re: [PATCH] clear_traps: reset savestatus

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

 



Op 29-11-18 om 20:56 schreef Harald van Dijk:
That's part of it, but not the whole story. Herbert Xu's comment about exitshell() was right, that is still a problem. A testcase for this is

   trap '(true) || echo bug' EXIT

Yes. Thanks. I hadn't thought about that.

The test case above is not quite complete. It needs to make sure the exit status is non-zero before executing the trap:

$ src/dash -c "trap '(true) || echo bug' EXIT; false"
bug

- Martijn



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

  Powered by Linux