On Tue, May 22, 2012 at 04:47:01AM -0700, Linda Walsh wrote: > If you are in your trap handler, and you don't reset the signal -- > how can you guarantee that your signal handler will be reset > before another even that would cause a trap occurs
You are using the wrong words for everything. A signal is an asynchronous event, potentially sent by another process. A signal handler is a bit of code that you write, and then register to be executed when you receive a signal. A trap is the same as a signal handler. ''trap'' is the name of the bash command to register a signal handler (assigning it to a set of signals). 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. The man page has only a partial answer. Under JOB CONTROL: Any trap on SIGCHLD is executed for each child that exits.