Date: Wed, 19 Feb 2020 23:53:56 +0000
From: Harald van Dijk <harald@gigawatt.nl>
Message-ID: <9b9d435b-3d2f-99bd-eb3d-4a676ce8927d@gigawatt.nl>
| POSIX says in the description of the trap command "Otherwise, the
| argument action shall be read and executed by the shell when one of the
| corresponding conditions arises." Because it says "when", not "after",
| if interpreted literally, it does not even allow waiting until the
| current command finishes executing.
You need to look at XCU 2.11 not just the description of the trap command
itself.
kre