Package: bash
Version: 4.2+dfsg-0.1

Hi,

bash starts a subshell by a pipeline:
$ : | exit; echo current shell
current shell

EXIT trap action is carried out in the subshell:
$ (trap 'echo exit subshell' EXIT; exit); echo current shell
exit subshell
current shell

However, as for the subshell, EXIT trap action is not carried out:
$ : | { trap 'echo exit subshell' EXIT; exit; }; echo current shell
current shell


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to