From: Joel VanderWerf Date: 2003-01-31T07:09:32+09:00 Subject: Re: SA_RESTART - signal - trap ahoward wrote: > On Thu, 30 Jan 2003 nobu.nokada@softhome.net wrote: > > >>Hi, >> >>At Thu, 30 Jan 2003 02:07:00 +0900, >>ahoward wrote: >> >>>does anyone know how to specify SA_RESTART in the signal mask such that >>>interupted system calls are automatically restarted on solaris, as they are on >>>linux? >> >>If all of sigprocmask, sigaction and SA_RESTART are available, >>ruby always sets it. > > > if that is the case, then shouldn't it be impossible for system calls to fail > with EINTR? (see thread regarding solaris/flock for history) I'm wondering too. I see this not only in Ara's test code, but in my own, with heavy demand by threads and processes doing shared reads and exclusive writes. After getting all(?) my concurrency bugs out, I still had to put in a few "rescue Errno::EINTR; retry" statements, or else there would be some (very infrequent) failures. Interestingly, it only seems to happen during the shared reads, so it looks like something one thread is doing causes a system call in another thread to be interrupted. Again, this is solaris only. Linux is fine.