[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Why does ctrl-c behave differently for builtin sleep in
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Why does ctrl-c behave differently for builtin sleep in a subshell? |
Date: |
Thu, 27 Dec 2018 13:46:24 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 12/25/18 11:28 AM, Peng Yu wrote:
> If I add a command after the builtin sleep, then the EXIT trap will be
> triggered upon typing ctrl-C.
>
> If the last command is removed, then the EXIT trap will not be
> triggered upon typing ctrl-C.
It's a bug in bash-4.4, fixed in bash-5.0.
--
``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/