Elliott Forney <idfah@cs.colostate.edu> writes:
> I guess my question is "can more than one trap run simultaneously?"
> The more I think about it though, this is probably not possible. It
> looks like the trap doesn't run in a subprocess
Traps are executed at command boundaries.
> and I presume traps are blocked inside of other traps.
Traps can be nested:
$ bash -c "trap 'echo INT; sleep 10; exit 2' INT; trap 'echo QUIT' QUIT; sleep
10"; echo $?
^CINT
^\QUIT
2
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."