On 05/22/2012 02:28 PM, Greg Wooledge wrote:
I do not know the answers to "How does bash implement traps? Is there
a guarantee that no signals will be lost?" Hopefully someone else does.
I can just imagine a situation when the bash is reading trap from the
source (is going through the script and is on line where trap is) or not
read it yet and the signal is received. Then, of course, your trap
handler is not installed yet.
Another situation: You had previous trap handler and you are installing
new one. The received signals are "paused" for a while and are processed
right after the installation of new trap handler. There was a bug report
against this, I'm not sure if it is fixed.
RR