On 3/30/20 2:45 PM, Oğuz wrote:
> Consider this:
>
> bash <<EOF
> foo() {
> trap 'echo exit' EXIT
> }
> foo &
> EOF
>
> After trap is set, the subshell exits and `echo exit` should be run,
> but it won't. If you set a RETURN trap instead it works though. This
> is reproducible on bash4 and bash5
Thanks for the report. This was fixed back in August 2019 in the devel
branch.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/