Philipp Hofmann
1/26/2008 4:18:00 PM
hi,
instead of working with an infinite loop, you could trap the Crtl-C
signal to make your loop come to an end.
stop = false
trap('INT') { stop = true }
until stop
# do your string stuff
end
g phil
On Sun, Jan 27, 2008 at 01:08:10AM +0900, Magician White wrote:
> Joachim Glauche wrote:
> > Magician White wrote:
> >> Hi, I'm new in Ruby and i found a little problem, make a simple program
> >> with a infinite loop to print one String. I use linux (Kubuntu) and when
> >> i try stop the program whit CTRL+C nothing happen the program dont stop
> >> only when i execute the KILL command the program stop.
> >> I do something wrong ?? How to solve this ?
> >
> > Check on your terminal if there is any key binding for CRTL+C like "Copy
> > to Clipboard".
>
> No CTRL+C stop processes i use it in all other programs.
> Only with Ruby dont work.