From: Ville Mattila Date: 2001-11-16T21:47:13+09:00 Subject: [ruby-talk:25417] Re: BUG? Solaris select or poll does not recover correctly when signaled ts writes: > >>>>> "V" == Ville Mattila writes: > > V> But I want raise this issue again as I think that this really > V> is a ruby bug. > > Apparently this is specific to Solaris. > > Can you try to protect all call to select(2) in eval.c against > ERESTART. For example, in rb_thread_select() something like this > > for (;;) { > TRAP_BEG; > n = select(max, read, write, except, tvp); > TRAP_END; > #ifdef ERESTART > if (n < 0 && (errno == EINTR || errno == ERESTART)) { > #else > if (n < 0 && errno == EINTR) { > #endif I did this modification to rb_thread_select and Invalid socket problem seems to be gone. Thank you very much! This fix is probably correct on Solaris, as for example solaris 8 source code includes similar check in truss program. - Ville