From: nobu.nokada@... Date: 2002-07-11T07:41:09+09:00 Subject: Re: Waits are not interrupted by signals Hi, At Thu, 11 Jul 2002 06:53:08 +0900, Bob Alexander wrote: > It appears that functions that are waiting are not interrupted by a > signal being handled. The wait just continues, although I would expect > it to raise Errno::EINTR. Because it's handled. > This seems like a bug to me, since a signal handler typically sets a > state that needs to be examined by the program's main flow of > control. If that doesn't happen, it can be impossible to respond to > signals in a timely way . trap("USR1") { p "handler invoked" raise SignalException.new("SIGUSR1") } p Process.pid begin p $stdin.read(1) rescue SignalException => e p e end -- Nobu Nakada