I've written some scripts that are nearly immortal.

Basically I wrote a loop, with a couple layers of rescues.

The Ctrl C would Raise an error, which would be caught by a rescue, and 
then the loop would start again.

My final solution, I'm sure there are more elegant ones, was to to put a 
sleep 5, after a rescue clause, before the loop started again.

This gave time to get two Ctrl C's in.

Tim Hunter wrote:
> Since I've been using Ruby I've noticed that a running Ruby script is
> hard to kill. Control-C won't do it. I have to use kill -9. Today I
> notice it with Ruby 1.8.6 on OS X 10.4.9, but it's been this way since I
> started using Ruby 6 or so years ago on Mandrake Linux. Do I have the
> wrong expectations?

-- 
Posted via http://www.ruby-forum.com/.