On 4/13/13 1:35 AM, Ilya Basin wrote: > Hi! > I've got strange behavior. Here's my script: > > #!/bin/bash > { > trap ' > echo "in trap EXIT">&2 > ' EXIT > sleep 4 & > echo 'sleep 2'>&2 > sleep 2 > echo 'wait $!'>&2 > wait $! > echo 'exit'>&2 > exit > } | cat > > If I press Ctrl-C during wait, the trap isn't triggered. > If I replace curly brackets with round brackets, it works. What's the > difference?
Thanks for the report. This was fixed a few months ago and the fix is in the devel branch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/