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 c...@case.edu http://tiswww.cwru.edu/~chet/