[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trap on EXIT doesn't get triggered in functions run in background
From: |
Chet Ramey |
Subject: |
Re: trap on EXIT doesn't get triggered in functions run in background |
Date: |
Mon, 30 Mar 2020 17:19:19 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 3/30/20 2:24 PM, Tau wrote:
> Bash Version: 5.0
> Patch Level: 7
> Release Status: release
>
> Description:
> When you execute a function in the background, and in that
> function you set a trap on EXIT, it doesn't get triggered when
> the function returns. This behavior doesn't seem to be
> documented anywhere and other shells (zsh, dash, ash) behave
> differently.
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 chet@case.edu http://tiswww.cwru.edu/~chet/