From: Dave Thomas Date: 2001-06-16T12:36:22+09:00 Subject: [ruby-talk:16527] Re: alarm() Joseph McDonald writes: > Is there a way to schedule a SIGALRM in ruby? > I ask because I want to abort a system() call if > it does not complete in "x" seconds. It appears that > the "timeout" class does not work when executing a > system call. Tacky, but you could start a thread that sends you a SIGALRM: Thread.new do sleep 2 Process.kill "ALRM", $$ end begin line = gets puts "You said #{line}" rescue SignalException puts "too slow!" end Regards Dave