From: Rob Merrell Date: 2007-04-05T15:11:00+09:00 Subject: Re: Ruby and capturing ^C ------=_Part_19025_646662.1175753457716 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline This should do the trick: trap("INT") do ...code block... end Rob On 4/4/07, Logan Capaldo wrote: > > On 4/5/07, Phy Prabab wrote: > > Hello! > > > > Is there any way to capture or "trap" ^C within Ruby? Something similar > to shell "trapping" is what I am after so that I can do clean up in the > event ^C is pressed. > > > > TIA! > > Phy > > > It's one thing when you don't know what to search for, but did you even > try? > http://www.google.com/search?hl=en&q=ruby+trap&btnG=Google+Search > > > > > > > > > > > ____________________________________________________________________________________ > > The fish are biting. > > Get more visitors on your site using Yahoo! Search Marketing. > > http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php > > -- c++: the power, elegance and simplicity of a hand grenade http://www.migrob.com ------=_Part_19025_646662.1175753457716--