From: "Iñaki Baz Castillo" Date: 2011-02-03T21:13:52+09:00 Subject: Re: How to know the exit status within at_exit() block? 2011/2/3 Eric Hodel : >> If you run this program and press Ctrl+C prior to 10 seconds you get: >> >>  "$!.inspect = Interrupt" >> >> So, at_exit block is executed but $! is not a SystemExit instance. I >> could trap the signals however. > > Yes, > > if SystemExit === $! then … end Thanks. I wonder if $! can be anything else apart from SystemExit and Interrupt. -- Iñaki Baz Castillo