Re: EXIT traps in interactive shells

2012-08-05 Thread Chet Ramey
On 7/29/12 12:55 PM, Chet Ramey wrote: > On 7/28/12 12:38 PM, Maarten Billemont wrote: >> Trapping on EXIT is a really convenient way of cleaning up after yourself >> when your script ends. > > I agree that the EXIT trap should work on {} asynchronous subshells, and I > will make sure that the ne

Re: EXIT traps in interactive shells

2012-07-29 Thread Chet Ramey
On 7/28/12 12:38 PM, Maarten Billemont wrote: > Trapping on EXIT is a really convenient way of cleaning up after yourself > when your script ends. I agree that the EXIT trap should work on {} asynchronous subshells, and I will make sure that the next version of bash does this. However, the two e

EXIT traps in interactive shells

2012-07-28 Thread Maarten Billemont
Trapping on EXIT is a really convenient way of cleaning up after yourself when your script ends. The nice thing about it is that you don't need to handle all sorts of signals, handle them, and re-throw them. It makes for a single clean point to define your exit handlers. Unfortunately, I've n