From: matz@... (Yukihiro Matsumoto) Date: 1999-01-22T23:57:39+09:00 Subject: [ruby-talk:00209] Re: Rescuing from a ^C? In message "[ruby-talk:00207] Re: Rescuing from a ^C?" on 99/01/22, Kazuhiro HIWADA writes: |> How would I in ruby rescue from a ^C? rescue with no arguments, Interrupt, |> or SystemExit fail, as does ensure. What I would like to do is allow ^C to |> escape from a loop, and then to continue the program. | |You can trap SIGINT like this, Or, you can handle it by begin ... loop do ... end rescue Interrupt ... end If you are using threads, notice interrupts will be delivered to the main thread. matz.