From: Paul Brannan Date: 2007-05-04T02:40:45+09:00 Subject: Re: Ruby and SIGVTALRM On Thu, May 03, 2007 at 02:50:04AM +0900, Joshua Haberman wrote: > Hi, > > Why would SIGVTALRM ever cause IO#sysread to throw EINTR? I'm having > a problem where a Net::HTTP connection is repeatedly dying because its > IO#sysread call is being interrupted and raising EINTR. I have > attached strace to the process, and verified that the signal being > raised is SIGVTALRM. Which platform are you running on and which version of ruby are you running? Do you have a small test case that can reproduce the problem? > P.S. Does the change in 1.8.6 of not setting SA_RESTART with > sigaction(2) mean that Ruby scripts now need to handle EINTR in many > places they did not previously have to? This appears to be the case, but I haven't tested it. Looks like maybe this was changed in response to [ruby-talk:133002]. Incidentally, one of my coworkers has recently found some cases in the python standard library that didn't handle EINTR correctly. It's easy to neglect if you aren't thinking about it. Paul