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

Reply via email to